brexhq / substation

Substation is a toolkit for routing, normalizing, and enriching security event and audit logs.
https://substation.readme.io
MIT License
330 stars 21 forks source link

feat(transform): Add Customizable Errors to MetaErr #174

Closed jshlbrd closed 6 months ago

jshlbrd commented 6 months ago

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: