diff --git a/EmployeeDirectory/Services/NetworkService.swift b/EmployeeDirectory/Services/NetworkService.swift new file mode 100644 index 0000000..5fb1366 --- /dev/null +++ b/EmployeeDirectory/Services/NetworkService.swift @@ -0,0 +1,25 @@ +// +// 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) +}