Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proposal] Consistent error reporting in pluggable components #31

Open
philliphoff opened this issue Mar 22, 2023 · 1 comment
Open
Labels
kind/proposal A new feature or change is requested
Milestone

Comments

@philliphoff
Copy link
Collaborator

Describe the proposal

It was a design goal to prevent/minimize exposure of gRPC concepts within the Pluggable Components SDK. However, the .NET gRPC SDK on which it is built does not propagate (by default) .NET standard exceptions. Components intending to report specific errors to applications must currently use gRPC-specific mechanisms (e.g. throw RpcException directly). As a secondary issue, gRPC clients/services have unofficially standardized on a means of reporting extended error information across gRPC boundaries, but this mechanism is not well supported on .NET, nor universally supported by the Dapr runtime (i.e. in how it traps/reports errors to applications).

There are several options:

  • Enable global pass-through of exceptions (i.e. GrpcServiceOptions.EnableDetailedErrors = true)
  • Rewrite a subset of exceptions using gRPC interceptors
  • Recommend use of RpcException (including or not, extended information)
  • Provide a mechanism to report extended information that doesn't rely on RpcException

My current thinking is the latter; to expose a specific type (e.g. DaprPluggableComponentException) for exceptions that are specifically intended to be returned to the caller, and have it accept the existing, extended error types (which are "RPC" specific but not "gRPC" specific), with the gRPC specific handling hidden away in the SDK infrastructure. This would also seem aligned with current thinking around how error handling should be made more consistent in the Dapr runtime itself (see dapr/dapr#6068).

@philliphoff philliphoff added the kind/proposal A new feature or change is requested label Mar 22, 2023
@tmacam
Copy link
Collaborator

tmacam commented Mar 22, 2023

Cool. I think we need to wait to see what will be the result of dapr/dapr#6068 before we can think on how to standardize those.

@philliphoff philliphoff added this to the v0.3.0 milestone Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/proposal A new feature or change is requested
Projects
None yet
Development

No branches or pull requests

2 participants