Skip to content

Commit cfdf12b

Browse files
fix(snapshots): Preserve error cause chain in upload error messages
Wrap upload errors in anyhow::Error before formatting so {:#} walks the full cause chain instead of showing only the top-level message. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f30b441 commit cfdf12b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/commands/build/snapshots.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,11 +432,12 @@ fn upload_images(
432432
let result = runtime.block_on(async { many_builder.send().await.error_for_failures().await });
433433
if let Err(errors) = result {
434434
let errors: Vec<_> = errors.collect();
435+
let error_count = errors.len();
435436
eprintln!("There were errors uploading images:");
436-
for error in &errors {
437+
for error in errors {
438+
let error = anyhow::Error::new(error);
437439
eprintln!(" {}", style(format!("{error:#}")).red());
438440
}
439-
let error_count = errors.len();
440441
anyhow::bail!("Failed to upload {error_count} images");
441442
}
442443

0 commit comments

Comments
 (0)