import Foundation enum CustomError: LocalizedError { case apiError(message: String) var errorDescription: String? { switch self { case .apiError(let message): return message } } }