Housekeeping. Unit tests, coverage, formatter, linter. (#4)
Reviewed-on: #4 Co-authored-by: Drew Galbraith <drew@tiramisu.one> Co-committed-by: Drew Galbraith <drew@tiramisu.one>
This commit is contained in:
parent
ef247e6e29
commit
8dae570755
4 changed files with 8 additions and 7 deletions
|
|
@ -9,6 +9,7 @@ use axum::{
|
|||
|
||||
// AppError
|
||||
// Borrowed from example: https://github.com/tokio-rs/axum/blob/axum-v0.8.4/examples/anyhow-error-response/src/main.rs
|
||||
#[derive(Debug)]
|
||||
pub enum AppError {
|
||||
InternalError(anyhow::Error),
|
||||
JsonExtractError(JsonRejection),
|
||||
|
|
@ -74,7 +75,7 @@ impl From<PathRejection> for AppError {
|
|||
|
||||
impl From<anyhow::Error> for AppError {
|
||||
fn from(err: anyhow::Error) -> Self {
|
||||
Self::InternalError(err.into())
|
||||
Self::InternalError(err)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue