Skip to content

Commit

Permalink
Use text/plain mimetype for errors that fall through
Browse files Browse the repository at this point in the history
These errors only pop-up if there's no error-handling middleware
defined. Right now the default content-type is application/json, so this
will be a bit nicer.
  • Loading branch information
evert committed Mar 1, 2020
1 parent 59a663d commit 2a872da
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export default class Application extends EventEmitter {
} else {
res.statusCode = 500;
}
res.setHeader('Content-Type', 'text/plain');
res.end(
// @ts-ignore
'Uncaught exception. No middleware was defined to handle it. We got the following HTTP status: ' +
Expand Down

0 comments on commit 2a872da

Please sign in to comment.