diff --git a/api/src/exceptions/index.ts b/api/src/exceptions/index.ts index 509b374a8f..a10b49202c 100644 --- a/api/src/exceptions/index.ts +++ b/api/src/exceptions/index.ts @@ -9,3 +9,4 @@ export * from './invalid-payload'; export * from './invalid-query'; export * from './route-not-found'; export * from './service-unavailable'; +export * from './unprocessable-entity'; diff --git a/api/src/exceptions/unprocessable-entity.ts b/api/src/exceptions/unprocessable-entity.ts new file mode 100644 index 0000000000..6fe580d5ea --- /dev/null +++ b/api/src/exceptions/unprocessable-entity.ts @@ -0,0 +1,7 @@ +import { BaseException } from './base'; + +export class UnprocessableEntityException extends BaseException { + constructor(message: string) { + super(message, 422, 'UNPROCESSABLE_ENTITY'); + } +}