Skip to content

Commit

Permalink
ContainerRegistry: Fix decodingErrors parameters which were still usi…
Browse files Browse the repository at this point in the history
…ng raw error codes
  • Loading branch information
euanh committed Oct 14, 2024
1 parent bca5f51 commit 4ecc87b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Sources/ContainerRegistry/Blobs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -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
}
Expand All @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/ContainerRegistry/Tags.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 4ecc87b

Please sign in to comment.