diff --git a/Sources/MauriNet/Global/NetworkError.swift b/Sources/MauriNet/Global/NetworkError.swift index b85d09c..a50635d 100644 --- a/Sources/MauriNet/Global/NetworkError.swift +++ b/Sources/MauriNet/Global/NetworkError.swift @@ -46,6 +46,11 @@ public enum NetworkError: Int, Error, CaseIterable, Sendable { /// Conflicts are most likely to occur in response to a PUT request. For example, you may get a 409 response when uploading a file which is older than the one already on the server resulting in a version control conflict. Source: [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409) case conflictOnResource = 409 + /// Indicates that the target resource is no longer available and this condition is likely to be permanent. + /// + /// Unlike 404, it signals the resource existed and was intentionally removed — clients should not retry. Source: [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/410) + case gone = 410 + /// Indicates that access to the target reSource has been denied. /// /// This happens with conditional requests on methods other than GET or HEAD when the condition defined by the If-Unmodified-Since or If-None-Match headers is not fulfilled. In that case, the request, usually an upload or a modification of a reSource, cannot be made and this error response is sent back. Source: [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/412) @@ -106,6 +111,8 @@ public enum NetworkError: Int, Error, CaseIterable, Sendable { return "Request was cancelled" case .conflictOnResource: return "There's an internal conflict with the requested reSource" + case .gone: + return "The requested reSource is permanently gone" case .preconditionFailed: return "Precondition failed for this request" case .serviceUnavailable: