dapr / dotnet-sdk

Dapr SDK for .NET
Apache License 2.0
1.11k stars 335 forks source link

Consider throwing a more specific exception than the generalized GrpcException for sidecar app errors #1370

Open oising opened 5 days ago

oising commented 5 days ago

Describe the feature

Currently (some? all?) sidecars application errors manifest as GrpcExceptions in apps. This should probably be wrapped as a general DaprException type to allow future more specific exceptions (e.g. DaprWorkflowException etc) to be thrown without breaking binary compatibility. Genuine Grpc protocol/comms errors should remain as GrpcException.

Release Note

RELEASE NOTE: ADD new dotnet DaprException as the base exception type to communicate exceptional conditions in the DAPR sidecar.

WhitWaldo commented 5 days ago

Especially as we're looking to move Workflow to stable, I think it makes sense to start this work scoped just to Workflow in the client and revisit with other gRPC connections over time as able.

We've already got a common DaprException we can use for this, so no need to introduce another.