Another secrets question: how can I test to see if...
# general
e
Another secrets question: how can I test to see if a secret exists with a specific name? Should I use
aws.secretsmanager.getSecret({name: "foo"});
with a try-catch?
w
I am actually not 100% sure whether the behaviour of
getSecret
is to throw when the lookup fails, or whether it succeeds and returns an object that indicates it couldn't be found. Either way, should be easy to test for (either try/catch or if).
e
Just tested, it throws.
but the error code is
undefined