refactor the main structure
This commit is contained in:
9
src/api/error.rs
Normal file
9
src/api/error.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
use derive_more::{Display, Error};
|
||||
|
||||
impl actix_web::error::ResponseError for ReturnedError{}
|
||||
|
||||
#[derive(Debug, Display, Error)]
|
||||
#[display(fmt = "my error: {}", name)]
|
||||
pub struct ReturnedError {
|
||||
pub name: String,
|
||||
}
|
||||
Reference in New Issue
Block a user