         }
         if let code = json["code"].asInt32 {
             if let errno = json["errno"].asInt32 {
-                return RemoteError(code: code, reason: FxAccountRemoteError(rawValue: errno),
+                return RemoteError(code: code, errno: errno,
                                    error: json["error"].asString,
                                    message: json["message"].asString,
                                    info: json["info"].asString)

        case let .Remote(error):
            let errorString = error.error ?? NSLocalizedString("Missing error", comment: "Error for a missing remote error number")
            let messageString = error.message ?? NSLocalizedString("Missing message", comment: "Error for a missing remote error message")
            return "<FxAClientError.Remote \(error.code)/\(error.reason?.rawValue): \(errorString) (\(messageString))>"
        case let .Local(error):
            return "<FxAClientError.Local Error Domain=\(error.domain) Code=\(error.code) \"\(error.localizedDescription)\">"
        }

    }
}

public struct FxAccountRemoteError {
    static let ATTEMPT_TO_OPERATE_ON_AN_UNVERIFIED_ACCOUNT: Int32     = 104
    static let INVALID_AUTHENTICATION_TOKEN: Int32                    = 110
    static let ENDPOINT_IS_NO_LONGER_SUPPORTED: Int32                 = 116
    static let INCORRECT_LOGIN_METHOD_FOR_THIS_ACCOUNT: Int32         = 117
    static let INCORRECT_KEY_RETRIEVAL_METHOD_FOR_THIS_ACCOUNT: Int32 = 118
    static let INCORRECT_API_VERSION_FOR_THIS_ACCOUNT: Int32          = 119
    static let UNKNOWN_DEVICE: Int32                                  = 123
    static let DEVICE_SESSION_CONFLICT: Int32                         = 124
    static let UNKNOWN_ERROR: Int32                                   = 999
}

public struct FxAKeysResponse {
