grpc / grpc-web

gRPC for Web Clients
https://grpc.io
Apache License 2.0
8.59k stars 765 forks source link

gRPC web do not throw error when grpc-message is a json stringifyed. #1327

Closed AMontagu closed 1 year ago

AMontagu commented 1 year ago

Hello

I am facing a strange issur right now (tested with grpc-web 1.3.1 & 1.4.2).

If I return a json stringifyed in the details of the grpc abort method no exception are called in the front.

request.context.abort(grpc.StatusCode.UNKNOWN, '{"message": "You do not have permission to perform this action.", "code": "permission_denied"}') -> Not raising exception in front

request.context.abort(grpc.StatusCode.UNKNOWN, 'test') -> raising exception.

Is this normal ? I failed finding any documentation on this.

EDIT 1: I am using ControllerPromiseClient class.

AMontagu commented 1 year ago

Seem like it's coming from a custom interceptor in my code. Sorry for disturbing.