Skip to content

Commit

Permalink
Merge branch 'development' of github.com:olasunkanmi-SE/restaurant in…
Browse files Browse the repository at this point in the history
…to development
  • Loading branch information
olasunkanmi-SE committed Oct 29, 2023
2 parents b4f6733 + 1d3abea commit f118a7b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions backend/src/infrastructure/filters/exception.filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ import { TYPES } from '../../application/constants';
import { IContextAwareLogger } from '../logger';
import { APIResponseMessage } from './../../application/constants/constants';
import { IExceptionResponse, IRequestException } from './exception-response.interface';
import { BaseExceptionFilter } from '@nestjs/core';

@Catch()
export class ApplicationExceptionsFilter implements ExceptionFilter {
export class ApplicationExceptionsFilter extends BaseExceptionFilter {
constructor(
@Inject(TYPES.IApplicationLogger)
private readonly logger: IContextAwareLogger,
) {}
) {
super();
}
catch(exception: any, host: ArgumentsHost) {
const context = host.switchToHttp();
const response = context.getResponse();
Expand Down

0 comments on commit f118a7b

Please sign in to comment.