diff --git a/src/core/interceptors/errors.interceptor.spec.ts b/src/core/interceptors/errors.interceptor.spec.ts new file mode 100644 index 0000000..ca053f7 --- /dev/null +++ b/src/core/interceptors/errors.interceptor.spec.ts @@ -0,0 +1,7 @@ +import { ErrorsInterceptor } from './errors.interceptor'; + +describe('ErrorsInterceptor', () => { + it('should be defined', () => { + expect(new ErrorsInterceptor()).toBeDefined(); + }); +}); diff --git a/src/core/interceptors/errors.interceptor.ts b/src/core/interceptors/errors.interceptor.ts new file mode 100644 index 0000000..de5f413 --- /dev/null +++ b/src/core/interceptors/errors.interceptor.ts @@ -0,0 +1,9 @@ +import { CallHandler, ExecutionContext, Injectable, NestInterceptor } from '@nestjs/common'; +import { Observable } from 'rxjs'; + +@Injectable() +export class ErrorsInterceptor implements NestInterceptor { + intercept(context: ExecutionContext, next: CallHandler): Observable { + return next.handle(); + } +}