@@ -164,6 +164,7 @@ extension NetworkError: CustomStringConvertible {
164164
165165public extension NetworkError {
166166 /// Returns true if this error represents a "not found" condition
167+ // periphery:ignore - TODO: remove this ignore when we merge NetworkError use
167168 var isNotFound : Bool {
168169 switch self {
169170 case . notFound:
@@ -176,6 +177,7 @@ public extension NetworkError {
176177 }
177178
178179 /// Returns true if this error represents an authorization issue
180+ // periphery:ignore - TODO: remove this ignore when we merge NetworkError use
179181 var isUnauthorized : Bool {
180182 switch self {
181183 case . invalidCookieNonce:
@@ -190,6 +192,7 @@ public extension NetworkError {
190192 }
191193
192194 /// Returns true if this error represents a timeout
195+ // periphery:ignore - TODO: remove this ignore when we merge NetworkError use
193196 var isTimeout : Bool {
194197 switch self {
195198 case . timeout:
@@ -202,6 +205,7 @@ public extension NetworkError {
202205 }
203206
204207 /// Returns true if this error represents invalid input/parameters
208+ // periphery:ignore - TODO: remove this ignore when we merge NetworkError use
205209 var isInvalidInput : Bool {
206210 switch self {
207211 case . unacceptableStatusCode( let statusCode, _) :
@@ -212,6 +216,7 @@ public extension NetworkError {
212216 }
213217
214218 /// Returns a user-friendly error message, preferring API error message over generic description
219+ // periphery:ignore - TODO: remove this ignore when we merge NetworkError use
215220 var userFriendlyMessage : String {
216221 return apiErrorMessage ?? localizedDescription
217222 }
@@ -220,12 +225,7 @@ public extension NetworkError {
220225// MARK: - Supporting Types
221226
222227/// Represents error details from API response JSON
223- public struct APIErrorDetails : Codable {
224- public let code : String
225- public let message : String ?
226-
227- public init ( code: String , message: String ? ) {
228- self . code = code
229- self . message = message
230- }
228+ struct APIErrorDetails : Codable {
229+ let code : String
230+ let message : String ?
231231}
0 commit comments