Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Fix/14453: Self-test "You Cannot Warn Others" error #4949

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,29 @@ enum OTPAuthorizationError: LocalizedError, Equatable {
return "generalError"
}
case .invalidResponseError:
return "invalidResponseError"
return "INVALID_RESPONSE_ERROR"
case .internalServerError:
return "internalServerError"
return "INTERNAL_SERVER_ERROR"
case .otpAlreadyUsedThisMonth:
return "otpAlreadyUsedThisMonth"
return "OTP_ALREADY_USED_THIS_MONTH"
case .otherServerError:
return "otherServerError"
return "OTHER_SERVER_ERROR"
case .apiTokenAlreadyIssued:
return "apiTokenAlreadyIssued"
return "API_TOKEN_ALEARY_ISSUED"
case .apiTokenExpired:
return "apiTokenExpired"
return "API_TOKEN_EXPIRED"
case .apiTokenQuotaExceeded:
return "apiTokenQuotaExceeded"
return "API_TOKEN_QUOTA_EXEEDED"
case .deviceBlocked:
return "deviceBlocked"
return "DEVICE_BLOCKED"
case .deviceTokenInvalid:
return "deviceTokenInvalid"
return "DEVICE_TOKEN_INVALID"
case .deviceTokenRedeemed:
return "deviceTokenRedeemed"
return "DEVICE_TOKEN_REDEEMED"
case .deviceTokenSyntaxError:
return "deviceTokenSyntaxError"
return "DEVICE_TOKEN_SYNTAX_ERROR"
case .noNetworkConnection:
return "noNetworkConnection"
return "NO_NETWORK_CONNECTION"
}
}

Expand Down
30 changes: 15 additions & 15 deletions src/xcode/ENA/ENA/Source/Services/OTP/Model/OTPError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,36 +25,36 @@ enum OTPError: Error, Equatable, LocalizedError {
switch self {
case .generalError(let error):
if let e = error?.localizedDescription {
return "generalError with underlying: \(e)"
return "GENERAL_ERROR with underlying: \(e)"
} else {
return "generalError"
return "GENERAL_ERROR"
}
case .invalidResponseError:
return "invalidResponseError"
return "INVALID_RESPONSE_ERROR"
case .internalServerError:
return "internalServerError"
return "INTERNAL_SERVER_ERROR"
case .otpAlreadyUsedThisMonth:
return "otpAlreadyUsedThisMonth"
return "OTP_ALREADY_USED_THIS_MONTH"
case .otherServerError:
return "otherServerError"
return "OTHER_SERVER_ERROR"
case .apiTokenAlreadyIssued:
return "apiTokenAlreadyIssued"
return "API_TOKEN_ALEARY_ISSUED"
case .apiTokenExpired:
return "apiTokenExpired"
return "API_TOKEN_EXPIRED"
case .apiTokenQuotaExceeded:
return "apiTokenQuotaExceeded"
return "API_TOKEN_QUOTA_EXEEDED"
case .deviceBlocked:
return "deviceBlocked"
return "DEVICE_BLOCKED"
case .deviceTokenInvalid:
return "deviceTokenInvalid"
return "DEVICE_TOKEN_INVALID"
case .deviceTokenRedeemed:
return "deviceTokenRedeemed"
return "DEVICE_TOKEN_REDEEMED"
case .deviceTokenSyntaxError:
return "deviceTokenSyntaxError"
return "DEVICE_TOKEN_SYNTAX_ERROR"
case .noNetworkConnection:
return "noNetworkConnection"
return "NO_NETWORK_CONNECTION"
case .restServiceError:
return "restServiceError"
return "REST_SERVICE_ERROR"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ extension SRSError: ErrorCodeProviding {
var description: String {
switch self {
case .ppacError(let ppacError):
return "ppacError: \(ppacError.description)"
return ppacError.description
case .otpError(let otpError):
return "otpError: \(otpError.description)"
return otpError.description
case .srsOTPClientError:
return "SRS_OTP_CLIENT_ERROR"
case .srsOTPNetworkError:
Expand Down