[💡 FEATURE REQUEST]: RPC response error code classification #1179
Labels
B-Breaking changes
Breaking changes
C-feature-request
Category: feature requested, but need to be discussed
Plugin
No response
I have an idea!
I have an idea, listen to me!!
The latest direction of RR giving control of the server via RPC commands with protobuf messages is absolutely amazing. In the same spirit, it would be nice to have a way to distinguish response errors. E.g, consider Jobs pipeline creation:
If the pipeline already exists,
JobsInterface
will throwJobsException
, but on the PHP side, we have no way of knowing whether it's the issue with the already existing pipeline and not e.g RPC failure or something else.We'd have to look into the exception message which is great for debugging, but not so much for building user-specific workflows around it.
It would help if JobsException also had a code given from RPC. We could also split up exceptions like
Jobs\PipelineAlreadyExistsException
, but that would still require passing an error code from the RPC.The text was updated successfully, but these errors were encountered: