     }
 }
 
+public func ==(lhs: Client.Error, rhs: Client.Error) -> Bool {
+    switch (lhs, rhs) {
+    case let (.NetworkError(error1), .NetworkError(error2)):
+        return error1 == error2
+        
+    case let (.JSONDeserializationError(error1), .JSONDeserializationError(error2)):
+        return error1 == error2
+        
+    case let (.JSONDecodingError(error1), .JSONDecodingError(error2)):
+        return error1 == error2
+        
+    case let (.APIError(error1), .APIError(error2)):
+        return error1 == error2
+        
+    default:
+        return false
+    }
+}
+
 internal func ==(lhs: Client.Endpoint, rhs: Client.Endpoint) -> Bool {
     switch (lhs, rhs) {
     case let (.ReleaseByTagName(owner1, repo1, tag1), .ReleaseByTagName(owner2, repo2, tag2)):

        
        /// An error that was returned from the API.
        case APIError(GitHubError)
    }
    
    /// Credentials for the GitHub API.

/// A GitHub API Client
public final class Client {
    /// An error from the Client.
    public enum Error: Hashable, ErrorType {
        /// An error occurred in a network operation.
        case NetworkError(NSError)
        
