This PR implements the IntoApiError trait and a derive macro for this trait.
This is for the usecase where clients want to use their own error types, but separately want to convert them into ApiError — possibly because the core of the application is written without reference to http, but each independent error can still be translated with reference to http problems and status codes. The derive macro is useful for cases where errors are built from enums of other errors, that already implement IntoApiError.
This PR implements the
IntoApiError
trait and a derive macro for this trait.This is for the usecase where clients want to use their own error types, but separately want to convert them into
ApiError
— possibly because the core of the application is written without reference to http, but each independent error can still be translated with reference to http problems and status codes. The derive macro is useful for cases where errors are built from enums of other errors, that already implementIntoApiError
.