26 lines
617 B
Swift
26 lines
617 B
Swift
//
|
|
// NetworkService.swift
|
|
// EmployeeDirectory
|
|
//
|
|
// Created by Matt Bruce on 1/20/25.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public enum NetworkServiceError: Error {
|
|
/// The response from the server was invalid (e.g., non-200 status code or malformed URL).
|
|
case invalidResponse
|
|
|
|
/// The url giving is invalid or malformed
|
|
case invalidURL
|
|
|
|
/// The data received was invalid or could not be decoded.
|
|
case decodingError(DecodingError)
|
|
|
|
/// A network-related error occurred.
|
|
case networkError(URLError)
|
|
|
|
/// An unexpected, uncategorized error occurred.
|
|
case unknownError(Error)
|
|
}
|