[🧹CHORE]: GRPC
better errors handling
#1001
Labels
C-enhancement
Category: enhancement. Meaning improvements of current module, transport, etc..
P-GRPC
Plugins: GRPC
Y-high
Priority: High
Milestone
No duplicates 🥲.
What should be improved or cleaned up?
At the moment, there is no way to distinguish between the applications errors and worker errors in the
grpc
plugin. The PHP client library sets the error protocol bit on any exception thrown from the PHP side, and this leads to worker restart on every exception.I propose to fully implement the google errors API design and return errors in the worker's response. If this is a protocol error - RR will restart the worker. But in case of an application error, we will parse the response and respond with an error code w/o restarting a worker.
The PHP worker may put the error payload in the response context which is
map[string]string
(contains grpc headers (metadata)) at the moment and should be updated with the new structure.The text was updated successfully, but these errors were encountered: