From 2fae029a22e2945a572432425bb3d48e5c2c81c9 Mon Sep 17 00:00:00 2001 From: rgarlik Date: Tue, 5 Apr 2022 12:35:30 +0200 Subject: [PATCH] errors now return error message --- src/lib/response-helpers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/response-helpers.ts b/src/lib/response-helpers.ts index b644cbb..99b7bf4 100644 --- a/src/lib/response-helpers.ts +++ b/src/lib/response-helpers.ts @@ -5,11 +5,11 @@ import LoggerService from './logger-service'; const log = LoggerService.GetInstance(); export function badRequest(res: NextApiResponse, message: string): void { - res.status(400).end(); + res.status(400).send(message); log.error(message); } export function internal(res: NextApiResponse, message: string): void { - res.status(500).end(); + res.status(500).send(message); log.error(message); }