Hi, let me just apologise in advance if this is something that has already been discussed, I have looked for similar discussions but have to found something I understood correctly.
Basically I have 2 questions regarding error handling in 2 different temporal scenarios.
(1) Lets say my workflow asks a repository for an entity by an ID. For example, lets say the workflow starts by checking if an Order with ID “abc” exists. A common way for repos to answer is with an error, something like “fmt.Errorf(“this entity %s does not exist”, entityID)”. If I in my workflow code want to react to this error, my first naive approach was to use Gos errors.Is(err, repoErr). However I understand now that this is not possible since temporal wrap the errors with metadata (correct me If I’m wrong). Atm I solve this by making the function that uses the repo return an empty entity instead of a error, and then in the workflow I check if the entity is empty. Is there a more elegant solution here. Something like workflow.Is(err, realErr) or something similar ? Any suggestion is welcome!
I would like to do something like below
Sry for my ignorance