When a Task is executed the Resource returns information as to the nature of the failure. According to the specification any error that is transferred to another state is an Error Output type containing an "Error Name" (named "Error") and optional "Cause" property.
When a state reports an error and it matches a Catcher, causing a transfer to another state, the state’s result (and thus the input to the state identified in the Catcher’s “Next” field) is a JSON object, called the Error Output. The Error Output MUST have a string-valued field named “Error”, containing the Error Name. It SHOULD have a string-valued field named “Cause”, containing human-readable text about the error.
So, if a Catcher has a ResultPath and can pluck the appropriately-formatted Error Output from the Result, everything is fine as long as the returned resource conforms to the Error Output specification. What's not clear is how to map the Task result to Error Output if no ResultPath is defined.
When a Task is executed the Resource returns information as to the nature of the failure. According to the specification any error that is transferred to another state is an
Error Output
type containing an "Error Name" (named "Error") and optional "Cause" property.So, if a Catcher has a ResultPath and can pluck the appropriately-formatted Error Output from the Result, everything is fine as long as the returned resource conforms to the Error Output specification. What's not clear is how to map the Task result to Error Output if no ResultPath is defined.
This needs to be codified and implemented.