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

Surface information about failed InvokeMethodAsync (and others) failures #1377

Open
atrauzzi opened this issue Oct 22, 2024 · 2 comments
Open
Labels
area/client/invoke kind/bug Something isn't working
Milestone

Comments

@atrauzzi
Copy link

Expected Behavior

I would have liked to have somehow obtained more easily viewed errors when a call to the sidecar fails. Including telemetry and structured logs so that I can eventually get the feedback in Aspire.

Actual Behavior

No log output, nothing helpful in exceptions. I have to see HTTP JSON output from the sidecar just to know what went wrong.

Steps to Reproduce the Problem

Configure a dapr HTTPEndpoint (not an Aspire HTTP endpoint 😆), make sure it uses https and point it to something that is hosting with an invalid certificate.

Try to call the HTTPEndpoint via dapr.

@atrauzzi atrauzzi added the kind/bug Something isn't working label Oct 22, 2024
@WhitWaldo
Copy link
Contributor

WhitWaldo commented Oct 22, 2024

More to this issue in particular, the request was returning as a 500 despite being a certificate validation failure, which should instead be in the 400s. Also, the SDK returned nothing about what the issue itself was even though the same request done manually through the service invocation HTTP API yielded the following (redacted) error (which itself also was returned as a 500):

{
"errorCode": "ERR_DIRECT_INVOKE",
"message": "failed to invoke, id: dapr-app-id, err: Get "https://auth.justanotherwebsite.com/api/v3/admin/version\": tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match auth.justanotherwebsite.com"
}

The SDK should instead surface whatever errors are provided by the runtime to help in debugging issues without having to resort to methods outside of the SDK.

@KrylixZA
Copy link

Just gonna bump this particular issue as we struggle with visibility into errors in production. We feel this problem on actor comms, but it is generally true for a lot of interactions with the Dapr Client. The nature of the exceptions is not very specific and struggles to surface the root cause of the issue and the error messages are generally pretty vague.

I'd love it if the client could surface more details in the exception messages.

@WhitWaldo WhitWaldo added this to the Future milestone Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/client/invoke kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants