File tree Expand file tree Collapse file tree 2 files changed +1
-3
lines changed Expand file tree Collapse file tree 2 files changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,6 @@ export class CustomExceptionFilter extends BaseExceptionFilter {
12
12
13
13
let errorResponse ;
14
14
let status = HttpStatus . INTERNAL_SERVER_ERROR ;
15
-
16
- this . logger . error ( `exception ::: ${ JSON . stringify ( exception ) } ` ) ;
17
15
18
16
if ( ! exception || '{}' === JSON . stringify ( exception ) ) {
19
17
errorResponse = {
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import {
17
17
intercept ( context : ExecutionContext , next : CallHandler ) : Observable < unknown > {
18
18
return next . handle ( ) . pipe (
19
19
catchError ( ( error ) => {
20
- if ( error . message . includes ( ResponseMessages . nats . error . natsConnect ) ) {
20
+ if ( error ?. message && error ? .message . includes ( ResponseMessages . nats . error . natsConnect ) ) {
21
21
this . logger . error ( `No subscribers for message: ${ error . message } ` ) ;
22
22
return throwError ( ( ) => new HttpException ( ResponseMessages . nats . error . noSubscribers , 500 ) ) ;
23
23
}
You can’t perform that action at this time.
0 commit comments