-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from picture-pro/unify-server-errors
Unify server errors
- Loading branch information
Showing
4 changed files
with
19 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
use leptos::ServerFnError; | ||
|
||
pub mod fetch; | ||
#[cfg(feature = "ssr")] | ||
pub mod model_ext; | ||
pub mod qr_code; | ||
pub mod rmp_sfn; | ||
pub mod upload; | ||
|
||
#[cfg(feature = "ssr")] | ||
pub fn handle_error( | ||
error: color_eyre::eyre::Report, | ||
failed_action: &'static str, | ||
) -> ServerFnError { | ||
tracing::error!("Failed to {}: {:?}", failed_action, &error); | ||
ServerFnError::new(error) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters