From 970d2730d48984be62ae04d804d73fb6cac0693c Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Mon, 18 Apr 2022 10:55:39 +0530 Subject: [PATCH] chore: typo correction for better error update Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- packages/nocodb/src/lib/noco/meta/helpers/catchError.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/nocodb/src/lib/noco/meta/helpers/catchError.ts b/packages/nocodb/src/lib/noco/meta/helpers/catchError.ts index ee75573a03..f83c8fc94b 100644 --- a/packages/nocodb/src/lib/noco/meta/helpers/catchError.ts +++ b/packages/nocodb/src/lib/noco/meta/helpers/catchError.ts @@ -8,7 +8,7 @@ export default function( // todo: error log console.log(requestHandler.name ? `${requestHandler.name} ::` : '', e); - if (e instanceof BasRequest) { + if (e instanceof BadRequest) { return res.status(400).json({ msg: e.message }); } else if (e instanceof Unauthorized) { return res.status(401).json({ msg: e.message }); @@ -26,7 +26,7 @@ export default function( }; } -class BasRequest extends Error {} +class BadRequest extends Error {} class Unauthorized extends Error {} class Forbidden extends Error {} class NotFound extends Error {} @@ -38,7 +38,7 @@ export class NcError { throw new NotFound(message); } static badRequest(message) { - throw new BasRequest(message); + throw new BadRequest(message); } static unauthorized(message) { throw new Unauthorized(message);