fix: Include limit in size exceeded error
parent
8b1255be9d
commit
a16c49537f
|
@ -78,7 +78,7 @@ async fn write(req: Request<Body>, app: Arc<App>) -> Result<Body, ApplicationErr
|
||||||
if (body.len() + chunk.len()) > MAX_SIZE {
|
if (body.len() + chunk.len()) > MAX_SIZE {
|
||||||
return Err(ApplicationError::new(
|
return Err(ApplicationError::new(
|
||||||
StatusCode::BAD_REQUEST,
|
StatusCode::BAD_REQUEST,
|
||||||
"Body exceeds limit",
|
"Body exceeds limit of 1MB",
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
body.extend_from_slice(&chunk);
|
body.extend_from_slice(&chunk);
|
||||||
|
|
Loading…
Reference in New Issue