Closed elena-kolevska closed 7 months ago
The new error model is not merged in runtime yet - so from the SDK perspective it does not exist yet. PRs welcome once there is a runtime RC that contains the new error model.
How about a new subclass of type grpc.RpcError
with all the convenience methods you need to make it easy to extract standardized Dapr error in a convenient way. This would be the most user friendly.
Of course everywhere in the code such as in save_state()
you need to catch the grpc.RpcError
and use that to instantiate your new error class. Then throw the new error class instead.
Yes, I was thinking the same. I'll start on it this week.
/assign
Describe the feature
Developers would have to do some gymnastics (example below) in their apps in order to get to the error details in the new, richer error model (https://github.com/dapr/dapr/pull/7257). I suggest we add a helper function in the SDK to improve the developer experience, at the very minimum - provide an equivalent of the
parse_grpc_error
function below.Here's what developers need to do, currently:
Release Note
RELEASE NOTE: UPDATE Improved developer experience for error handling