[SFN] Fix Unknown Service sfn errors #10631
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
The current version of the SFN v2 interpreter lacks the capability to enhance aws-sdk failures if the service name of the resource isn't associated with any explicit bindings or isn't available in boto's service catalog. As a result, it generates unknown service error messages, causing the interpreter to fail without reporting the decorated aws-sdk source error.
This pull request aims to resolve this issue by refining the logic for decorating service error names to accurately search for a normalised error name. In cases where none is found, it logs such incidents and returns the original service name as an error. This adjustment is intended to enable the computation to continue, albeit with slightly different cause and error string formatting, while also emphasising the necessity for more explicit normalised error name bindings.
Furthermore, the PR includes bindings for aws-sdk stepfunctions error names along with relevant snapshot tests, addressing issue #10622.
Changes