diff --git a/src/exception/client-exception/index.ts b/src/exception/client-exception/index.ts index 87313db..27e8ecd 100644 --- a/src/exception/client-exception/index.ts +++ b/src/exception/client-exception/index.ts @@ -6,3 +6,4 @@ export { NotFoundException } from './not-found-exception'; export { TokenExpiredException } from './token-expired-exception'; export { UnauthorizedException } from './unauthorized-exception'; export { ConflictException } from './conflict-exception'; +export { UnprocessableEntityException } from './unprocessable-entity-exception'; diff --git a/src/exception/client-exception/unprocessable-entity-exception.ts b/src/exception/client-exception/unprocessable-entity-exception.ts new file mode 100644 index 0000000..59db79f --- /dev/null +++ b/src/exception/client-exception/unprocessable-entity-exception.ts @@ -0,0 +1,8 @@ +import { HttpState } from '../../http-client'; +import { ClientException } from './client-exception'; + +export class UnprocessableEntityException extends ClientException { + constructor(message = 'UNPROCESSABLE ENTITY', cause?: Error) { + super(HttpState.UNPROCESSABLE_ENTITY, message, cause); + } +} diff --git a/src/exception/index.ts b/src/exception/index.ts index 93ed988..3d5d545 100644 --- a/src/exception/index.ts +++ b/src/exception/index.ts @@ -7,6 +7,7 @@ export { TokenExpiredException, UnauthorizedException, ConflictException, + UnprocessableEntityException, } from './client-exception'; export { CustomException } from './custom-exception'; export { DataException, InternalServerException, ServerException, UnknownException } from './server-exception';