This allows callers to choose the error type of the FromRequest
implementation, as long as it implements From<Error> + IntoResponse.
ea12b73 refactor: move Error from tx to root
This is in preparation for using Error in Layer.
935c27e refactor!: make Service infallible
Service's associated Error type is now Infallible, meaning it can
be used with axum::Router::layer directly, without any
HandleErrorLayer shenanigans.
This was achieved by using Error to convert any sqlx::Errors on
commit into a response. The downside of this is that the error message
will be returned to clients, but this will be fixed subsequently.
BREAKING CHANGE: It's no longer possible to layer axum_sqlx_tx::Layer
with HandleErrorLayer, it should be layered on its own instead.
8ace093 refactor: add Error generic type to Layer
This allows callers to choose the error type that's converted to a
response in the event that committing returns an error.
To maintain backwards compatibility, and ergonomic default usage, a
separate Layer::new_with_error function is needed to create a Layer
with an error type other than Error.
f9f7b1e doc: flesh out error handling documentation
This includes examples of using the E generic type parameter to
control how errors are converted to responses.
3d915de feat: add
E
rror generic type toTx
This allows callers to choose the error type of the
FromRequest
implementation, as long as it implementsFrom<Error> + IntoResponse
.ea12b73 refactor: move
Error
fromtx
to rootThis is in preparation for using
Error
inLayer
.935c27e refactor!: make
Service
infallibleService
's associatedError
type is nowInfallible
, meaning it can be used withaxum::Router::layer
directly, without anyHandleErrorLayer
shenanigans.This was achieved by using
Error
to convert anysqlx::Error
s on commit into a response. The downside of this is that the error message will be returned to clients, but this will be fixed subsequently.BREAKING CHANGE: It's no longer possible to layer
axum_sqlx_tx::Layer
withHandleErrorLayer
, it should be layered on its own instead.8ace093 refactor: add
E
rror generic type toLayer
This allows callers to choose the error type that's converted to a response in the event that committing returns an error.
To maintain backwards compatibility, and ergonomic default usage, a separate
Layer::new_with_error
function is needed to create aLayer
with an error type other thanError
.f9f7b1e doc: flesh out error handling documentation
This includes examples of using the
E
generic type parameter to control how errors are converted to responses.0ba85c9 chore: bump version