Permalink
Browse files

improve invalid response object error message

  • Loading branch information...
1 parent ce5b587 commit a09cc44d1f7ee383d0cbc2d0202cee4bf1ea44d6 William Skinner 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 a09cc44

Please sign in to comment.