aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/error.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/error.ts')
-rw-r--r--server/middlewares/error.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/middlewares/error.ts b/server/middlewares/error.ts
index 7b116eb57..540edaeeb 100644
--- a/server/middlewares/error.ts
+++ b/server/middlewares/error.ts
@@ -18,7 +18,10 @@ function apiFailMiddleware (req: express.Request, res: express.Response, next: e
18 }) 18 })
19 19
20 res.status(status) 20 res.status(status)
21 res.setHeader('Content-Type', 'application/problem+json') 21
22 if (!res.headersSent) {
23 res.setHeader('Content-Type', 'application/problem+json')
24 }
22 25
23 const json = new ProblemDocument({ 26 const json = new ProblemDocument({
24 status, 27 status,