Adds an option to configure which error messages should be caught using the Meta Err transform
Motivation and Context
This transform catches all errors, but there are some cases where only specific errors should be caught while others should crash the application. By default this option is the same as the existing solution, and it matches the behavior used by ErrorMessages elsewhere in the app (https://github.com/brexhq/substation/blob/main/internal/aws/config.go#L96).
How Has This Been Tested?
Added unit test that shows it catching errors when configured.
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[x] My code follows the code style of this project.
[x] My change requires a change to the documentation.
Description
Motivation and Context
This transform catches all errors, but there are some cases where only specific errors should be caught while others should crash the application. By default this option is the same as the existing solution, and it matches the behavior used by
ErrorMessages
elsewhere in the app (https://github.com/brexhq/substation/blob/main/internal/aws/config.go#L96).How Has This Been Tested?
Added unit test that shows it catching errors when configured.
Types of changes
Checklist: