Replace NetworkError::CorsViolation and NetworkErrorr::SecurityBlock with granular enum variants

Signed-off-by: Uthman Yahaya Baba <uthmanyahayababa@gmail.com>
This commit is contained in:
Uthman Yahaya Baba 2025-04-24 14:50:10 +01:00
parent 545364c636
commit be1c84587d
2 changed files with 2 additions and 1 deletions

View file

@ -46,6 +46,7 @@ use crate::protocols::ProtocolRegistry;
use crate::request_interceptor::RequestInterceptor;
use crate::subresource_integrity::is_response_integrity_valid;
#[allow(dead_code)]
const PARTIAL_RESPONSE_TO_NON_RANGE_REQUEST_ERROR: &str = "Refusing to provide partial response\
from earlier ranged request to API that did not make a range request";

View file

@ -225,7 +225,7 @@ impl FetchResponseListener for FetchContext {
let _ac = enter_realm(&*promise);
match fetch_metadata {
// Step 4.1
Err(_) => {
Err(error) => {
promise.reject_error(
Error::Type(format!("Network error: {:?}", error)),
CanGc::note(),