Skip to content

Commit

Permalink
errors now return error message
Browse files Browse the repository at this point in the history
  • Loading branch information
rgarlik committed Apr 5, 2022
1 parent a11cab9 commit 2fae029
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/response-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

1 comment on commit 2fae029

@vercel
Copy link

@vercel vercel bot commented on 2fae029 Apr 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.