Skip to content

Commit

Permalink
fix(H-Keyring): if getCache returns error that is !EntryDoesNotExist,…
Browse files Browse the repository at this point in the history
… throw
  • Loading branch information
texastony committed Oct 11, 2024
1 parent 95b05a6 commit a93598b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,8 @@ module AwsKmsHierarchicalKeyring {
verifyValidStateCache(cache);
var getCacheOutput := getEntry(cache, getCacheInput);

// If error is opaque, return Failure
if (getCacheOutput.Failure? && getCacheOutput.error.Opaque?) {
// If error is not EntryDoesNotExist, return Failure
if (getCacheOutput.Failure? && !getCacheOutput.error.EntryDoesNotExist?) {
return Failure(getCacheOutput.error);
}

Expand Down Expand Up @@ -869,8 +869,8 @@ module AwsKmsHierarchicalKeyring {
verifyValidStateCache(cache);
var getCacheOutput := getEntry(cache, getCacheInput);

// If error is opaque, return Failure
if (getCacheOutput.Failure? && getCacheOutput.error.Opaque?) {
// If error is not EntryDoesNotExist, return Failure
if (getCacheOutput.Failure? && !getCacheOutput.error.EntryDoesNotExist?) {
return Failure(getCacheOutput.error);
}

Expand Down

0 comments on commit a93598b

Please sign in to comment.