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);