Skip to content

Commit

Permalink
Handle JWT exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
alvaromrveiga committed Jun 4, 2022
1 parent 563f3cd commit 7f97d8c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/common/interceptors/exception.interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
NestInterceptor,
} from '@nestjs/common';
import { catchError, Observable } from 'rxjs';
import { JwtExceptionHandler } from './handlers/jwt-exception.handler';
import { PrismaExceptionHandler } from './handlers/prisma-exception.handler';
import { UserInputExceptionHandler } from './handlers/user-input-exception.handler';

Expand All @@ -30,6 +31,8 @@ export class ExceptionInterceptor implements NestInterceptor {

new PrismaExceptionHandler().handle(error);

new JwtExceptionHandler().handle(error);

throw error;
}),
);
Expand Down

0 comments on commit 7f97d8c

Please sign in to comment.