Observed behavior
The error hooks only runs if the provider throws an exception. However, it's possible for a provider to return an error code in the ResolutionDetails. For clarity and flexibilty, we should consider resolutions that return an error code as errors; this will allow providers to signal errors without creating expensive strack traces, as well.
Expected Behavior
The error hook runs and resolution is considered erroneous if the ResolutionDetails contains an errorCode
Steps to reproduce
- Register a provider that returns a
ResolutionDetails object with an errorCode
- Register a hook that relies on the error hook
- Evaluate a flag
Observed behavior
The error hooks only runs if the provider throws an exception. However, it's possible for a provider to return an error code in the
ResolutionDetails. For clarity and flexibilty, we should consider resolutions that return an error code as errors; this will allow providers to signal errors without creating expensive strack traces, as well.Expected Behavior
The error hook runs and resolution is considered erroneous if the
ResolutionDetailscontains anerrorCodeSteps to reproduce
ResolutionDetailsobject with anerrorCode