diff --git a/quickpeep_raker/src/raking.rs b/quickpeep_raker/src/raking.rs index fa9c66b..b51dea6 100644 --- a/quickpeep_raker/src/raking.rs +++ b/quickpeep_raker/src/raking.rs @@ -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 => {