Improves error message when authenticating with invalid anisette data

A common reason anisette data is invalid is because the host computer's date & time settings are off, so now we ask the user to check their computer's date & time in the localized recovery suggestion.
This commit is contained in:
Riley Testut
2021-09-13 15:27:40 -07:00
parent babb2c0856
commit a9d1d6edf5
2 changed files with 3 additions and 1 deletions

View File

@@ -7,6 +7,7 @@
//
import Foundation
import AltSign
public extension ALTServerError
{
@@ -16,6 +17,7 @@ public extension ALTServerError
{
case let error as ALTServerError: self = error
case let error as ALTServerConnectionError: self = ALTServerError(.connectionFailed, underlyingError: error)
case let error as ALTAppleAPIError where error.code == .invalidAnisetteData: self = ALTServerError(.invalidAnisetteData, underlyingError: error)
case is DecodingError: self = ALTServerError(.invalidRequest, underlyingError: error)
case is EncodingError: self = ALTServerError(.invalidResponse, underlyingError: error)
case let error as NSError: