We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de2e6cb commit 55c0c11Copy full SHA for 55c0c11
lib/grpc/GrpcServer.ts
@@ -32,7 +32,13 @@ class GrpcServer {
32
if (!status) {
33
logger.debug(`unknown status for call ${ctx.service.path}`);
34
} else if (status.code !== 0) {
35
- logger.error(`call ${ctx.service.path} errored with code ${status.details.code}: ${status.details.message}`);
+ if (typeof status.details === 'object') {
36
+ logger.error(`call ${ctx.service.path} errored with code ${status.details.code}: ${status.details.message}`);
37
+ } else if (typeof status.details === 'string') {
38
+ logger.error(`call ${ctx.service.path} errored with code ${status.code}: ${status.details}`);
39
+ } else {
40
+ logger.error(`call ${ctx.service.path} errored with code ${status.code}`);
41
+ }
42
} else {
43
logger.trace(`call ${ctx.service.path} succeeded`);
44
}
0 commit comments