File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -128,9 +128,11 @@ export class ClientGrpcProxy extends ClientProxy implements ClientGrpc {
128128
129129 const context = grpcPackage . load ( options ) ;
130130 return context ;
131- } catch ( e ) {
131+ } catch ( err ) {
132132 const invalidProtoError = new InvalidProtoDefinitionException ( ) ;
133- this . logger . error ( invalidProtoError . message , invalidProtoError . stack ) ;
133+ const message = err && err . message ? err . message : invalidProtoError . message ;
134+
135+ this . logger . error ( message , invalidProtoError . stack ) ;
134136 throw invalidProtoError ;
135137 }
136138 }
Original file line number Diff line number Diff line change @@ -155,9 +155,11 @@ export class ServerGrpc extends Server implements CustomTransportStrategy {
155155
156156 const context = grpcPackage . load ( options ) ;
157157 return context ;
158- } catch ( e ) {
158+ } catch ( err ) {
159159 const invalidProtoError = new InvalidProtoDefinitionException ( ) ;
160- this . logger . error ( invalidProtoError . message , invalidProtoError . stack ) ;
160+ const message = err && err . message ? err . message : invalidProtoError . message ;
161+
162+ this . logger . error ( message , invalidProtoError . stack ) ;
161163 throw invalidProtoError ;
162164 }
163165 }
Original file line number Diff line number Diff line change 1- import { Transport , ClientOptions } from '@nestjs/microservices' ;
1+ import { ClientOptions , Transport } from '@nestjs/microservices' ;
22import { join } from 'path' ;
33
44export const grpcClientOptions : ClientOptions = {
You can’t perform that action at this time.
0 commit comments