diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index b42d868..d8e1407 100644 --- a/src/main.rs +++ b/src/main.rs @@ -203,7 +203,7 @@ pub async fn serve_stream<T: Unpin + Send + 'static + hyper::rt::Read + hyper::r let mut resp = Response::new(format!( "Sorry, we were unable to process your request: {error}" )); - *resp.status_mut() = StatusCode::BAD_REQUEST; + *resp.status_mut() = error.status_code(); resp.headers_mut() .insert(CONTENT_TYPE, HeaderValue::from_static("text/plain")); resp.headers_mut() |