From 2c8318b0b957d310ade44120e496faf9aa39ab6a Mon Sep 17 00:00:00 2001 From: Lex Toumbourou Date: Tue, 16 Dec 2014 13:40:00 +1000 Subject: [PATCH] Ensure response.error is populated correctly. --- cyclone/httpclient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cyclone/httpclient.py b/cyclone/httpclient.py index c0abd534f8..efa931e587 100644 --- a/cyclone/httpclient.py +++ b/cyclone/httpclient.py @@ -132,7 +132,7 @@ def fetch(self): else: break - response.error = None + response.error = response.code >= 400 response.headers = dict(response.headers.getAllRawHeaders()) # HTTP 204 and 304 responses have no body # http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html