Hi
Within a workflow i want to react differently given the underlying activity error type but sadly when looking at the documentation on how to do so the proposed method does not exist.
If you take a look at https://docs.temporal.io/docs/go-error-handling you will see the method “OriginalType” but this one does not exist in the returned error nor when casting this one to an applicationError and after searching in the entire sdk code the “OriginalType” only appears in comments.
So i tried different things like applicationError.Unwrap() but this one does not return the underlying error but nil ! Even tho the error message is clearly from my error.
I’m using the 1.3 version of your sdk.
You can see code sample here:
errAct := workflow.ExecuteActivity(ctxA, some_activity, some_params).Get(ctxA, nil)
errAct.OriginalType() // does not compile
var applicationErr *temporal.ApplicationError
if errors.As(err, &applicationErr) {
fmt.Println(applicationErr.Unwrap()) //isNil
}