Open
Description
Problem
There are a few places within the package where logical/configuration errors are swallowed silently (see #19 for one example). We should add a configuration parameter that allows developers to throw validation exceptions in these cases. The original reason for not throwing exceptions was the idea that a monitoring tool shouldn't negatively impact the application. It would be possible that throwing exceptions in these cases would cause applications to crash at runtime. However, this should be weighed against the behavior today which arguably violates the principle of least astonishment. The current behavior is not clear from the interface design.
Next Steps
- Enumerate all the places where this is an issue.
- Add configuration parameter
THROW_ON_VALIDATION_ERRORS
(or better name?) that defaults to false. - Accept comments on whether or not the default behavior should be changed to throw which would go out in the next major version.