dhiaayachi / temporal

Temporal service
https://docs.temporal.io
MIT License
0 stars 0 forks source link

Fix uninformative message when targeting nonexistent workflows #409

Open dhiaayachi opened 2 weeks ago

dhiaayachi commented 2 weeks ago

Is your feature request related to a problem? Please describe. Various APIs return a very un-helpful error message if the user targets a nonexistent workflow. Often something like this:

Status { code: NotFound, message: "sql: no rows in result set", details: b"\x08\x05\x12\x1asql: no rows in result set\x1aB\n@type.googleapis.com/temporal.api.errordetails.v1.NotFoundFailure", metadata: MetadataMap { headers: {"content-type": "application/grpc"} }, source: None }

Which I received in response to a workflow cancel request.

Describe the solution you'd like The message in the response should be something meaningful like "Workflow foo-bar was not found when attempting workflow cancellation", rather than some message straight out of the database.

dhiaayachi commented 23 hours ago

Thank you for reporting this issue. I understand that the error messages provided by Temporal when targeting a non-existent workflow are not very informative.

While there is no specific documentation on this, the current implementation uses SQL errors for workflow related errors. I would suggest implementing a custom error handler within your application to provide a more user-friendly error message when a workflow is not found.

Let me know if you have any other questions or suggestions.

dhiaayachi commented 21 hours ago

Thanks for reporting this! I understand the pain point of receiving unhelpful error messages when a workflow is not found. Unfortunately, the documentation I have does not explicitly cover how to customize the error messages for this specific scenario.

To help me understand better and suggest a potential workaround, could you tell me which programming language and SDK you're using? Knowing this will allow me to provide more tailored advice.