HTTP Problem-based Error Handling Library
This crate provides a general mechanism for error handling based on the
RFC 7807 problem entity with the Problem type.
Users can find many pre-defined errors at the http and sql modules.
The workflow for error handling with this library is as follow:
- Use the predefined errors/functions or define a new one with the
define_custom_type!macro to returns errors in functions that returnResult<T, Problem>(an alias is provided in the library).- You can also use the extensions traits
ResultExt,ProblemResultExt,OptionExtto handle common cases.
- You can also use the extensions traits
- Catch any desired error with
ProblemResultExt::catch_err.