Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix S3 canary match statement #2358

Merged
merged 4 commits into from
Feb 13, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tools/ci-cdk/canary-lambda/src/s3_canary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use crate::{mk_canary, CanaryEnv};
use anyhow::Context;
use aws_config::SdkConfig;
use aws_sdk_s3 as s3;
use aws_sdk_s3::error::GetObjectErrorKind;
use s3::error::GetObjectError;
use s3::types::ByteStream;
use uuid::Uuid;
Expand Down Expand Up @@ -36,7 +37,10 @@ pub async fn s3_canary(client: s3::Client, s3_bucket_name: String) -> anyhow::Re
);
}
Err(err) => match err.into_service_error() {
GetObjectError::NoSuchKey(..) => {
GetObjectError {
kind: GetObjectErrorKind::NoSuchKey(..),
..
} => {
// good
}
err => Err(err).context("unexpected s3::GetObject failure")?,
Expand Down