From 2a872dac1b97cdf8188bb22ac89166e8b48d98ff Mon Sep 17 00:00:00 2001 From: Evert Pot Date: Sat, 29 Feb 2020 14:37:44 -0500 Subject: [PATCH] Use text/plain mimetype for errors that fall through 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. --- src/application.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/application.ts b/src/application.ts index 6750935..a488f53 100644 --- a/src/application.ts +++ b/src/application.ts @@ -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: ' +