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

Don't pass every error to the client #28

Closed
FoseFx opened this issue Dec 23, 2022 · 1 comment · Fixed by #652
Closed

Don't pass every error to the client #28

FoseFx opened this issue Dec 23, 2022 · 1 comment · Fixed by #652
Labels
enhancement New feature or request

Comments

@FoseFx
Copy link
Member

FoseFx commented Dec 23, 2022

Is your feature request related to a problem? Please describe:

For what I can see the dapr SDK simply responds with err.Error() in case we return an error.
As the content type is text/plain we limit ourselves in the richness of errors we can provide.
We can not add translations or additional error codes or alike.

Describe the solution you'd like

Return a simple json object.

{
  "error": {
    "message": "..."
  }
}

We can extend it later if we need to.

Additional Comments

We should also update the content-type header to application/json and probably need to write middleware for this.

@FoseFx FoseFx added enhancement New feature or request priority: normal labels Dec 23, 2022
@FoseFx FoseFx changed the title Error Handling Errors Dec 23, 2022
@MaxSchaefer MaxSchaefer changed the title Errors Don't pass every error to the client Jul 15, 2023
@MaxSchaefer
Copy link
Member

We are moved to gRPC, but still our errors are quite "transparent".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants