This paper develops theoretical foundations for an error analysis of approximate equilibria in dynamic stochastic general equilibrium models with heterogeneous agents and incomplete financial markets. While there are several algorithms which compute prices and allocations for which agents' first order conditions are approximately satisfied (approximate equilibria), there are few results on how to interpret the errors in these candidate solutions and how to relate the computed allocations and prices to exact equilibrium allocations and prices. We give a simple example which illustrates that approximate equilibria might be very far from exact equilibria. We then interpret approximate equilibria as equilibria for close-by economies, that is, for economies with close-by individual endowments and preferences. We provide sufficient conditions which ensure that approximate equilibria are close to exact equilibria of close-by economies. We give a detailed discussion of the error analysis for two models which are commonly used in applications, and OLG model with stochastic production and an asset pricing model with infinitively lived agents. We illustrate the analysis with some numerical examples. In these examples, the derived bounds are at most one order of magnitude larger than maximal errors in Euler equations.