mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Replace NetworkError::CorsViolation and NetworkErrorr::SecurityBlock with granular enum variants
Signed-off-by: Uthman Yahaya Baba <uthmanyahayababa@gmail.com>
This commit is contained in:
parent
545364c636
commit
be1c84587d
2 changed files with 2 additions and 1 deletions
|
@ -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";
|
||||
|
||||
|
|
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue