Closed maxcountryman closed 10 months ago
Attention: 9 lines
in your changes are missing coverage. Please review.
Comparison is base (
b59749c
) 75.89% compared to head (3ec66f6
) 74.70%.
Files | Patch % | Lines |
---|---|---|
tower-sessions-core/src/service.rs | 30.76% | 9 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This reworks the tower service such that we always return a response. In other words, the service becomes infallible. What this means is we no longer need to build an intermediary service that captures boxed errors when using this crate with axum.
One side effect of this is that we lose the ability to handle specific errors, such as the session save failing, via downcasting. Instead, the middleware will return a 500 response. To address this, we could extend this implementation to allow for an on error callback, which could take an error and return a response.
This is a breaking change which also removes two extraneous variants from the session error type:
MissingId
MissingCookies