dapr / js-sdk

Dapr SDK for Javascript
Apache License 2.0
197 stars 82 forks source link

Inconsistent error handling between communication protocol for state management #481

Open SoTrx opened 1 year ago

SoTrx commented 1 year ago

Expected Behavior

Whether you use HTTP or gRPC shouldn't matter for coding.

Actual Behavior

The save() method in the gRPC implementation throws an exception on failure, which is great However, the same save() method in the HTTP implementation returns an object containing an error without actually throwing an exception.

Steps to Reproduce the Problem

You can see this in the code itself

Re-trowing the error in the HTTP implementation should fix this, and perhaps using the cause attribute on top of that to chain errors would also help with debugging.

I can help with this if needed.

SoTrx commented 1 year ago

/assign

dapr-bot commented 1 year ago

This issue has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.

shubham1172 commented 1 year ago

/keep-alive