     case let (.JSONDecodingError(error1), .JSONDecodingError(error2)):
         return error1 == error2
         
-    case let (.APIError(statusCode1, error1), .APIError(statusCode2, error2)):
-        return statusCode1 == statusCode2 && error1 == error2
+    case let (.APIError(statusCode1, response1, error1), .APIError(statusCode2, response2, error2)):
+        return statusCode1 == statusCode2 && response1 == response2 && error1 == error2
         
     case (.DoesNotExist, .DoesNotExist):
         return true

                        if response.statusCode >= 400 && response.statusCode < 600 {
                            return GitHubError.decode(JSON)
                                .mapError(Error.JSONDecodingError)
                                .flatMap { .Failure(Error.APIError(response.statusCode, $0)) }
                        }
                        return Resource.decode(JSON).mapError(Error.JSONDecodingError)
                    }
                    .map { resource in
                        return (Response(headerFields: response.allHeaderFields as! [String:String]), resource)
                    }
            }
    }

        /// An error occurred while decoding JSON.
        case JSONDecodingError(DecodeError)
        
        /// A status code, response, and error that was returned from the API.
        case APIError(Int, Response, GitHubError)
        
        /// The requested object does not exist.
        case DoesNotExist
