Files
NetNewsWire/SyncClients/ReaderAPI/Sources/ReaderAPI/ReaderAPIError.swift
2023-08-28 07:55:04 -07:00

29 lines
820 B
Swift

//
// ReaderAPIError.swift
//
//
// Created by Jeremy Beker on 5/28/19.
//
import Foundation
public enum ReaderAPIError: LocalizedError {
case unknown
case invalidParameter
case invalidResponse
case urlNotFound
public var errorDescription: String? {
switch self {
case .unknown:
return NSLocalizedString("An unexpected error occurred.", comment: "An unexpected error occurred.")
case .invalidParameter:
return NSLocalizedString("An invalid parameter was passed.", comment: "An invalid parameter was passed.")
case .invalidResponse:
return NSLocalizedString("There was an invalid response from the server.", comment: "There was an invalid response from the server.")
case .urlNotFound:
return NSLocalizedString("The API URL wasn't found.", comment: "The API URL wasn't found.")
}
}
}