forked from Shared/esg
initial commit
This commit is contained in:
12
src/common/exceptions/inquiry.exception.ts
Normal file
12
src/common/exceptions/inquiry.exception.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { HttpException, HttpStatus } from '@nestjs/common';
|
||||
import { NormalizedErrorDto } from '../dto/normalized-error.dto';
|
||||
|
||||
export class InquiryException extends HttpException {
|
||||
constructor(
|
||||
message: string,
|
||||
public readonly normalizedError: NormalizedErrorDto,
|
||||
status: HttpStatus = HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
) {
|
||||
super({ message, error: normalizedError }, status);
|
||||
}
|
||||
}
|
||||
11
src/common/exceptions/provider.exception.ts
Normal file
11
src/common/exceptions/provider.exception.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { HttpException, HttpStatus } from '@nestjs/common';
|
||||
import { NormalizedErrorDto } from '../dto/normalized-error.dto';
|
||||
|
||||
export class ProviderException extends HttpException {
|
||||
constructor(
|
||||
public readonly normalizedError: NormalizedErrorDto,
|
||||
status: HttpStatus = HttpStatus.BAD_GATEWAY,
|
||||
) {
|
||||
super(normalizedError, status);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user