diff --git a/Sources/tart/OCI/Registry.swift b/Sources/tart/OCI/Registry.swift index 5e465ec..cabf61c 100644 --- a/Sources/tart/OCI/Registry.swift +++ b/Sources/tart/OCI/Registry.swift @@ -214,8 +214,8 @@ class Registry { parameters: lastChunk ? ["digest": digest] : [:], body: chunk ) - let expectedStatus = lastChunk ? HTTPCode.Created.rawValue : HTTPCode.Accepted.rawValue - if response.statusCode != expectedStatus { + // always accept both statuses since AWS ECR is not following specification + if response.statusCode != HTTPCode.Created.rawValue && response.statusCode != HTTPCode.Accepted.rawValue { throw RegistryError.UnexpectedHTTPStatusCode(when: "streaming blob to \(uploadLocation)", code: response.statusCode, details: data.asText()) }