first
This commit is contained in:
commit
fd8c97600a
8 changed files with 1712 additions and 0 deletions
17
src/error.rs
Normal file
17
src/error.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
use axum::http::StatusCode;
|
||||
use axum::response::{IntoResponse, Response};
|
||||
|
||||
pub type Result<T> = core::result::Result<T, Error>;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
LoginFail,
|
||||
}
|
||||
|
||||
impl IntoResponse for Error {
|
||||
fn into_response(self) -> Response {
|
||||
println!("->> {:<12} - {self:?}", "INTO_RESPONSE");
|
||||
|
||||
(StatusCode::INTERNAL_SERVER_ERROR, "UNHANDLED_CLIENT_ERROR").into_response()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue