Convert size limit hits into permanent failures
This commit is contained in:
parent
e66ac80484
commit
e88bf6cb44
@ -227,7 +227,9 @@ async fn response_to_bytes_limited(
|
||||
buffer.extend_from_slice(next_chunk?.as_bytes());
|
||||
if buffer.len() > size_limit {
|
||||
increment_counter!("qprake_rake_specific_fail_count", "reason" => "SizeLimit");
|
||||
bail!("Exceeds size limit");
|
||||
return Err(PermanentFailure {
|
||||
reason: PermanentFailureReason::ExceedsSizeLimit,
|
||||
}.into());
|
||||
}
|
||||
},
|
||||
None => {
|
||||
|
Loading…
Reference in New Issue
Block a user