mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-23 00:00:15 +02:00
Start writing more tests
This commit is contained in:
+5
-1
@@ -44,6 +44,9 @@ pub enum Error {
|
||||
|
||||
#[error("unknown URL param `{0}`")]
|
||||
UnknownUrlParam(String),
|
||||
|
||||
#[error("response body didn't contain valid UTF-8")]
|
||||
InvalidUtf8,
|
||||
}
|
||||
|
||||
impl From<Infallible> for Error {
|
||||
@@ -69,7 +72,8 @@ where
|
||||
Error::DeserializeRequestBody(_)
|
||||
| Error::QueryStringMissing
|
||||
| Error::DeserializeQueryString(_)
|
||||
| Error::InvalidUrlParam { .. } => make_response(StatusCode::BAD_REQUEST),
|
||||
| Error::InvalidUrlParam { .. }
|
||||
| Error::InvalidUtf8 => make_response(StatusCode::BAD_REQUEST),
|
||||
|
||||
Error::Status(status) => make_response(status),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user