diff --git a/backend/rvoc-backend/src/web/session.rs b/backend/rvoc-backend/src/web/session.rs index c78c2d8..a35af42 100644 --- a/backend/rvoc-backend/src/web/session.rs +++ b/backend/rvoc-backend/src/web/session.rs @@ -211,15 +211,15 @@ impl SessionStoreConnector for RVocSessionStoreConnector { Err(typed_session::Error::UpdatedSessionDoesNotExist) } Err(TryInsertSessionError::PermanentTransactionError(error)) => { - Err(RVocError::UpdateSession { source: error }) - .map_err(typed_session::Error::SessionStoreConnector) + Err(typed_session::Error::SessionStoreConnector( + RVocError::UpdateSession { source: error }, + )) } - Err(error @ TryInsertSessionError::TooManyTemporaryTransactionErrors { .. }) => { - Err(RVocError::UpdateSession { + Err(error @ TryInsertSessionError::TooManyTemporaryTransactionErrors { .. }) => Err( + typed_session::Error::SessionStoreConnector(RVocError::UpdateSession { source: Box::new(error), - }) - .map_err(typed_session::Error::SessionStoreConnector) - } + }), + ), } }