You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an error is thrown in a grpc method, the grpc server will normally crash with UNCAUGHT EXCEPTION Error. When using ges, the error is ignored, the server keeps running and the call never finishes because the grpc callback isn't executed.
This happens because in the catch clause the variable handled will be true in this case (the grpc method was already called). Then the error will just be logged but the callback never executed.
I'd suggest to either never ignore errors or make sure that handled is set to true only after the original implementation was executed without throwing an error.
The text was updated successfully, but these errors were encountered:
I knew it. I used to make this experimental feature transparent. They don't need to know its existence. Their method handlers should behave the same in both ExperimentalServer and the original grpc.Server.
When you throw error in method handler, the original grpc.Server would just make the process exit.
Now, I see the code. Since we wrap the method handler in async function, then we would throw unhandled rejection warning instead of exiting.
So I think your suggestion is reasonable. We can send the error to the client
When an error is thrown in a grpc method, the grpc server will normally crash with
UNCAUGHT EXCEPTION Error
. When usingges
, the error is ignored, the server keeps running and the call never finishes because the grpc callback isn't executed.Example:
service.proto:
server.js:
This happens because in the catch clause the variable
handled
will betrue
in this case (the grpc method was already called). Then the error will just be logged but the callback never executed.node-grpc-experimental-server-interceptors/packages/grpc-experimental-server/src/index.ts
Line 112 in f01c171
I'd suggest to either never ignore errors or make sure that
handled
is set totrue
only after the original implementation was executed without throwing an error.The text was updated successfully, but these errors were encountered: