dapr icon indicating copy to clipboard operation
dapr copied to clipboard

Error Standardization: Actors API

Open cicoyle opened this issue 2 years ago • 4 comments

Richer errors in Dapr for the Actors API.

Note: Please clone this issue and assign the clone of this issue to yourself if you would like to contribute to the error standardization efforts.

Scope of work

  • [ ] Choose 5-10 errors in the Actors API to enrich. Ideally, cover as many errors as possible from the API.
  • [ ] Follow the steps outlined in this README for each error being updated

Definition of done

  • [ ] Update 5-10 errors in the Actors API
  • [ ] Update the unit tests, if necessary
  • [ ] Write integration tests to cover each updated errors

Keep in mind

Unless a major version is being released and there is a solid reason for introducing backwards incompatibility, we can't change the API, meaning the HTTP and gRPC status codes, and the error codes must stay the same. An exception to this is the gRPC StatusCode.UNKNOWN which should be converted to a specific status.

See the kit errors pkg README for another usage example. For each error being updated, you can use the following helper functions to add error details, see the kit errors pkg for more details:

  • WithHelpLink()
  • WithHelp()
  • WithErrorInfo() - Required
  • WithFieldViolation()
  • WithDetails()

Reference PRs

Existing error standardization for:

cicoyle avatar Jan 22 '24 17:01 cicoyle

TODO: Link to the docs once this docs PR is merged

cicoyle avatar Jan 22 '24 17:01 cicoyle

/assign

michaelzixizhou avatar Jan 31 '24 21:01 michaelzixizhou

Hey @michaelzixizhou - lmk if you need any pointers on getting started 🙂

cicoyle avatar Feb 05 '24 14:02 cicoyle

Hey @michaelzixizhou - lmk if you need any pointers on getting started 🙂

Thank you @cicoyle ! I'll keep that in mind for sure

michaelzixizhou avatar Feb 07 '24 02:02 michaelzixizhou