diff --git a/Sources/ContainerRegistry/Blobs.swift b/Sources/ContainerRegistry/Blobs.swift index 1435c62..ec2b2ab 100644 --- a/Sources/ContainerRegistry/Blobs.swift +++ b/Sources/ContainerRegistry/Blobs.swift @@ -64,7 +64,7 @@ public extension RegistryClient { do { let _ = try await executeRequestThrowing( .head(registryURLForPath("/v2/\(repository)/blobs/\(digest)")), - decodingErrors: [404] + decodingErrors: [.notFound] ) return true } catch HTTPClientError.unexpectedStatusCode(status: .notFound, _, _) { return false } @@ -83,7 +83,7 @@ public extension RegistryClient { return try await executeRequestThrowing( .get(registryURLForPath("/v2/\(repository)/blobs/\(digest)"), accepting: ["application/octet-stream"]), - decodingErrors: [404] + decodingErrors: [.notFound] ) .data } @@ -106,7 +106,7 @@ public extension RegistryClient { return try await executeRequestThrowing( .get(registryURLForPath("/v2/\(repository)/blobs/\(digest)"), accepting: ["application/octet-stream"]), - decodingErrors: [404] + decodingErrors: [.notFound] ) .data } diff --git a/Sources/ContainerRegistry/Tags.swift b/Sources/ContainerRegistry/Tags.swift index a91af3d..decb91d 100644 --- a/Sources/ContainerRegistry/Tags.swift +++ b/Sources/ContainerRegistry/Tags.swift @@ -18,7 +18,7 @@ public extension RegistryClient { precondition(repository.count > 0, "repository must not be an empty string") return try await executeRequestThrowing( .get(registryURLForPath("/v2/\(repository)/tags/list")), - decodingErrors: [404] + decodingErrors: [.notFound] ) .data }