Obj str do it #255
@@ -216,9 +216,13 @@ pub mod endpoint {
|
|||||||
Err(err) => match err {
|
Err(err) => match err {
|
||||||
labyrinth::Error::Info(err_str) => {
|
labyrinth::Error::Info(err_str) => {
|
||||||
eprintln!("Error: {:?}", err_str);
|
eprintln!("Error: {:?}", err_str);
|
||||||
|
response.message = err_str.to_string();
|
||||||
|
return (axum::http::StatusCode::INTERNAL_SERVER_ERROR, axum::Json(response));
|
||||||
}
|
}
|
||||||
labyrinth::Error::SError(err_s) => {
|
labyrinth::Error::SError(err_s) => {
|
||||||
eprintln!("Error: {:?}", err_s);
|
eprintln!("Error: {:?}", err_s);
|
||||||
|
response.message = err_s.to_string();
|
||||||
|
return (axum::http::StatusCode::INTERNAL_SERVER_ERROR, axum::Json(response));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user