diff --git a/Auth0/CredentialsManager.swift b/Auth0/CredentialsManager.swift index d8039470..bf634cf3 100644 --- a/Auth0/CredentialsManager.swift +++ b/Auth0/CredentialsManager.swift @@ -362,12 +362,7 @@ public struct CredentialsManager { private func retrieveCredentials() -> Credentials? { guard let data = self.storage.getEntry(forKey: self.storeKey) else { return nil } - do { - return try JSONDecoder().decode(Credentials.self, from: data) - } catch { - print(error.localizedDescription) - return nil - } + return try? JSONDecoder().decode(Credentials.self, from: data) } // swiftlint:disable:next function_body_length diff --git a/Auth0/CredentialsStorage.swift b/Auth0/CredentialsStorage.swift index d7694f78..abc22501 100644 --- a/Auth0/CredentialsStorage.swift +++ b/Auth0/CredentialsStorage.swift @@ -34,14 +34,7 @@ extension SimpleKeychain: CredentialsStorage { /// - Parameter key: The key to get from the Keychain. /// - Returns: The stored data. public func getEntry(forKey key: String) -> Data? { - do { - return try self.data(forKey: key) - } catch { - print(error.localizedDescription - ) - return nil - } - + return try? self.data(forKey: key) } /// Sets a storage entry.