From b16bbf587abdaa81015d5d8bc92214db6fac4185 Mon Sep 17 00:00:00 2001 From: Nikolay Edigaryev Date: Wed, 8 Jun 2022 17:23:16 +0300 Subject: [PATCH] Registry: log upload location when encountering blob pushing error (#121) --- Sources/tart/OCI/Registry.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/tart/OCI/Registry.swift b/Sources/tart/OCI/Registry.swift index 74e2bb8..2f18dc4 100644 --- a/Sources/tart/OCI/Registry.swift +++ b/Sources/tart/OCI/Registry.swift @@ -184,8 +184,8 @@ class Registry { body: fromData) if putResponse.status != .created { let body = try await postResponse.body.readTextResponse() - throw RegistryError.UnexpectedHTTPStatusCode(when: "pushing blob (PUT)", code: putResponse.status.code, - details: body ?? "") + throw RegistryError.UnexpectedHTTPStatusCode(when: "pushing blob (PUT) to \(uploadLocation)", + code: putResponse.status.code, details: body ?? "") } return digest