Registry: log upload location when encountering blob pushing error (#121)

This commit is contained in:
Nikolay Edigaryev
2022-06-08 17:23:16 +03:00
committed by GitHub
parent 022317bc17
commit b16bbf587a
+2 -2
View File
@@ -184,8 +184,8 @@ class Registry {
body: fromData) body: fromData)
if putResponse.status != .created { if putResponse.status != .created {
let body = try await postResponse.body.readTextResponse() let body = try await postResponse.body.readTextResponse()
throw RegistryError.UnexpectedHTTPStatusCode(when: "pushing blob (PUT)", code: putResponse.status.code, throw RegistryError.UnexpectedHTTPStatusCode(when: "pushing blob (PUT) to \(uploadLocation)",
details: body ?? "") code: putResponse.status.code, details: body ?? "")
} }
return digest return digest