temporalio / temporalio/temporal
Return more accurate error codes
@alexshtin is already working on this.
Since Jul 17, 2021.
- Dominant language
- Go
- Stars
- 23.2k
- Forks
- 1.9k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 228
Description
Is your feature request related to a problem? Please describe.
In many places better error code can be returned from different APIs. One of the example is NOT_FOUND error code is returned when requesting a termination and workflow is already completed. It makes it impossible to differentiate this from the case when workflow is actually doesn't exists. FAILED_PRECONDITION seems to be a better error code according to the https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto.
Describe the solution you'd like
All public APIs need to be reviews holistically and proper adjustment should be made.
Additional context
https://community.temporal.io/t/terminating-a-completed-run-grpc-error-code-is-not-found-why-not-aborted-or-failed-precondition/2565
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.