Skip to content

Commit

Permalink
Provide inner error
Browse files Browse the repository at this point in the history
  • Loading branch information
augustuswm committed Sep 28, 2023
1 parent 4bd760f commit c0dde69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rfd-api/src/authn/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ pub enum CloudKmsError {
#[error("CloudKMS signing request did not return a signature")]
MissingSignature,
#[error("Failed to find remote key")]
RemoteKeyAuthMissing,
RemoteKeyAuthMissing(#[from] std::io::Error),
}

// Signer that relies on a private key stored in GCP, and a locally store JWK. This signer never
Expand Down
4 changes: 2 additions & 2 deletions rfd-api/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pub async fn cloud_kms_client() -> Result<CloudKMS<HttpsConnector<HttpConnector>
?err,
"Failed to construct Cloud KMS credentials from service account"
);
CloudKmsError::RemoteKeyAuthMissing
CloudKmsError::RemoteKeyAuthMissing(err)
})?
}
yup_oauth2::authenticator::ApplicationDefaultCredentialsTypes::InstanceMetadata(auth) => {
Expand All @@ -108,7 +108,7 @@ pub async fn cloud_kms_client() -> Result<CloudKMS<HttpsConnector<HttpConnector>
?err,
"Failed to construct Cloud KMS credentials from instance metadata"
);
CloudKmsError::RemoteKeyAuthMissing
CloudKmsError::RemoteKeyAuthMissing(err)
})?
}
};
Expand Down

0 comments on commit c0dde69

Please sign in to comment.