Permalink
Browse files

Merge pull request #88 from weskinner/master

improve invalid response object error message
  • Loading branch information...
2 parents ce5b587 + a09cc44 commit 180dc76716bc5f64fc9a107041f658744c159229 @nrstott committed Feb 26, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/middleware/bodyAdapter.js
@@ -21,7 +21,7 @@ module.exports = middleware(function (req, nextApp) {
}
var searchFriendlyErrorCode = 'BODY_ADAPTER_BAD_RESPONSE_BODY';
- var reason = 'Middleware error: bodyAdapter found response body that does not have a forEach method, is not a Buffer, and is not a readable Stream.';
+ var reason = 'Middleware error: The response object returned by your route handler for "'+req.pathInfo+'" is not a proper bogart JSGI response. It does not have a forEach method, is not a Buffer, and is not a readable Stream';
throw new Error(reason + ' ' + searchFriendlyErrorCode);
});

0 comments on commit 180dc76

Please sign in to comment.