Skip to content

Commit

Permalink
fix(s3): Don't log PermanentRedirect errors (#1543)
Browse files Browse the repository at this point in the history
  • Loading branch information
loewenheim authored Oct 24, 2024
1 parent a56852b commit 6ab3160
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/symbolicator-service/src/download/s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ impl S3Downloader {
_ if matches!(err.code(), Some("NoSuchBucket" | "NoSuchKey" | "NotFound")) => {
Err(CacheError::NotFound)
}
_ => {
// Log errors, filtering out some uninteresting ones.
//
// * PermanentRedirect is a user error.
_ if !matches!(err.code(), Some("PermanentRedirect")) => {
tracing::error!(
error = &err as &dyn std::error::Error,
"S3 request failed: {:?}",
Expand All @@ -173,6 +176,10 @@ impl S3Downloader {
let details = err.to_string();
Err(CacheError::DownloadError(details))
}
_ => {
let details = err.to_string();
Err(CacheError::DownloadError(details))
}
};
}
};
Expand Down

0 comments on commit 6ab3160

Please sign in to comment.