fix text/plain response for 500 errors
add ENOENT err.code support for 404