Skip to content

Commit e08853a

Browse files
authored
Merge pull request #14406 from NixOS/better-error-message
libstore/http-binary-cache-store: Improve error messages in HttpBinar…
2 parents f1d4fab + c874e70 commit e08853a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libstore/http-binary-cache-store.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ void HttpBinaryCacheStore::upsertFile(
157157
try {
158158
getFileTransfer()->upload(req);
159159
} catch (FileTransferError & e) {
160-
throw UploadToHTTP("while uploading to HTTP binary cache at '%s': %s", config->cacheUri.to_string(), e.msg());
160+
UploadToHTTP err(e.message());
161+
err.addTrace({}, "while uploading to HTTP binary cache at '%s'", config->cacheUri.to_string());
162+
throw err;
161163
}
162164
}
163165

0 commit comments

Comments
 (0)