Implement Into<CaptureError> for the default server function error type (#4205)
* implement Into<CaptureError> for the server function error type * document the server function error type * fix tests
This commit is contained in:
1 parent
67f717647f
commit
f610c6b8c1
20 files changed
+316
-96
No files matched your search
@@ -196,7 +196,7 @@ pub async fn connect_to_database() -> SqlitePool {
|
||||
pub type Session =
|
||||
axum_session_auth::AuthSession<crate::auth::User, i64, SessionSqlitePool, sqlx::SqlitePool>;
|
||||
|
||||
pub async fn get_session() -> Result<Session, ServerFnError> {
|
||||
pub async fn get_session() -> ServerFnResult<Session> {
|
||||
extract::<Session, _>()
|
||||
.await
|
||||
.map_err(|_| ServerFnError::new("AuthSessionLayer was not found"))
|
||||
|
||||
Reference in new issue
Block a user