diff --git a/lib/interceptors/http-to-grpc.interceptor.ts b/lib/interceptors/http-to-grpc.interceptor.ts index 16dccdd..743db14 100644 --- a/lib/interceptors/http-to-grpc.interceptor.ts +++ b/lib/interceptors/http-to-grpc.interceptor.ts @@ -40,7 +40,12 @@ export class HttpToGrpcInterceptor implements NestInterceptor { return throwError( () => new RpcException({ - message: exception.message, + message: JSON.stringify({ + error: exception.message, + type: + typeof exception.message === "string" ? "string" : "object", + exceptionName: RpcException.name, + }), code: statusCode, }), );