aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/net_traits/lib.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/components/net_traits/lib.rs b/components/net_traits/lib.rs
index 8cece70866a..7e841fd645b 100644
--- a/components/net_traits/lib.rs
+++ b/components/net_traits/lib.rs
@@ -228,10 +228,8 @@ impl FetchTaskTarget for IpcSender<FetchResponseMsg> {
}
fn process_response_eof(&mut self, response: &Response) {
- if response.is_network_error() {
- // todo: finer grained errors
- let _ =
- self.send(FetchResponseMsg::ProcessResponseEOF(Err(NetworkError::Internal("Network error".into()))));
+ if let Some(e) = response.get_network_error() {
+ let _ = self.send(FetchResponseMsg::ProcessResponseEOF(Err(e.clone())));
} else {
let _ = self.send(FetchResponseMsg::ProcessResponseEOF(Ok(())));
}