1
This commit is contained in:
@@ -89,6 +89,12 @@ impl IntoResponse for AppError {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<AppError> for Response {
|
||||
fn from(error: AppError) -> Self {
|
||||
error.into_response()
|
||||
}
|
||||
}
|
||||
|
||||
fn resolve_http_error(status_code: StatusCode) -> (&'static str, &'static str) {
|
||||
match status_code {
|
||||
StatusCode::BAD_REQUEST => ("BAD_REQUEST", "请求参数不合法"),
|
||||
|
||||
Reference in New Issue
Block a user