You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Feat: custom error type support
Error responses of `lambda_runtime` are now customizable. One use case
is to avoid using `std::any::type_name` for error types, which is not
reliable for determining subsequent program behavior.
`F::Error` of `Runtime::run` and `run` is required to implement
`Into<Diagnostic<'a>>` instead of `Display`.
`EventErrorRequest` accepts a value implementing `Into<Diagnostic<'a>>`
instead of the error type and message.
`Diagnostic` becomes public because users may implement their own
conversions. Its fields are wrapped in `Cow` so that they can carry both
borrowed and owned strings. `Diagnostic` is implemented for every type
that implements `Display` as a fallback, which also ensures backward
compatibility.
* Chore: add example to comments on Diagnostic
The comments on `Diagnositc` shows how to customize error responses with
an example.
0 commit comments