1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 11:36:03 +01:00

Merge pull request #14406 from NixOS/better-error-message

libstore/http-binary-cache-store: Improve error messages in HttpBinar…
This commit is contained in:
Sergei Zimmerman 2025-10-29 03:23:49 +00:00 committed by GitHub
commit e08853a67c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -157,7 +157,9 @@ void HttpBinaryCacheStore::upsertFile(
try {
getFileTransfer()->upload(req);
} catch (FileTransferError & e) {
throw UploadToHTTP("while uploading to HTTP binary cache at '%s': %s", config->cacheUri.to_string(), e.msg());
UploadToHTTP err(e.message());
err.addTrace({}, "while uploading to HTTP binary cache at '%s'", config->cacheUri.to_string());
throw err;
}
}