BE/src/exceptions/internalServerError.exception.ts
2025-06-05 17:06:18 +05:30

20 lines
429 B
TypeScript

import { HttpException, HttpStatus } from '@nestjs/common';
export class InternalServerException extends HttpException {
constructor(
message = 'Internal server error',
errorCode = 'INTERNAL_ERROR',
data: any = null,
) {
super(
{
statusCode: HttpStatus.INTERNAL_SERVER_ERROR,
message,
// errorCode,
// data,
},
HttpStatus.INTERNAL_SERVER_ERROR,
);
}
}