Created by: weaver
Hi,
Right now, if the proxy request produces and error, a JSON stack trace is written out.
This patch adds the ability to completely customize this behavior by listening for a proxyError
event. Otherwise, if NODE_ENV=production
, the string "Internal Server Error" is written instead of a stack trace. This in-production default behavior mimics Express/Connect. Otherwise, the stack trace is still printed out.
If this implementation isn't suitable, some way to prevent a stack trace in production would be nice.
Best wishes,
-Ben