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

[FEATURE REQUEST] Improve Dapr HTTP client error handling #794

Open
passuied opened this issue Mar 14, 2025 · 0 comments · May be fixed by #793
Open

[FEATURE REQUEST] Improve Dapr HTTP client error handling #794

passuied opened this issue Mar 14, 2025 · 0 comments · May be fixed by #793
Labels
kind/enhancement New feature or request

Comments

@passuied
Copy link

Describe the feature

The error handling experience when calling invoking a method over HTTP is very lacking.
There are many cases where the exception thrown is just DaprInternalError with message Dapr Internal Error (UNKNOWN).
It doesn't provide the status code or the reason which are available in the response.

This change intends to address the issue so that:

  • message is either:
    • the value for the JSON serialized message property returned in the response body if available
    • HTTP status code: {status_code}
  • errorCode is either:
    • the value for the JSON serialized errorCode` property returned in the response body if available
    • ERR_DOES_NOT_EXIST if the status_code is 404 and no response body is returned (existing behavior)
    • UNKNOWN otherwise
  • status_code is the status code return by the response
  • reason is the reason associated to the status code (set by requests library)

Release Note

RELEASE NOTE: ADDImprove Dapr HTTP client error handling

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