-
Notifications
You must be signed in to change notification settings - Fork 10
Description
In Brane, we often choose to catch our errors right before we send them back to the user and then replace them with some kind of SecretError or HTTP response containing no information and then logging our error to stderr.
This mechanism, however, is implemented in various different ways throughout the workspace. I suggest we move to a singular Error type (maybe repurpose SecretError) where we add a constructor method or some function that does this fairly standard swap.
One thing I would like to add to this mechanism once it is standardized is a unique identifier that is generated for all surfaced errors, and attach those to both the user response and the log-entry. This way, we can map the responses sent to the user directly to a full error in our logs.
@Lut99, what are your thoughts?