Closed apazzolini closed 3 years ago
This looks great! There's one minor issue: this is a breaking change. If you were previously requesting a non-existent secret, you'd get a blank string, but now you'll get an error. Given the very specific use case I think we may be able to release this as a minor version bump without breaking too many people's flows. Though we may want to add a flag so that if a user's setup does break, they have recourse to restore the original behavior. Wdyt about a new no-exit-on-missing-secret
flag (or something similarly named)?
Definitely agree with that change. The flag name is good, matches no-exit-on-write-failure
.
If you request a secret that doesn't exist, we currently return an empty string. This PR changes the behavior to throw an error if the secret was not found. If you request multiple secrets, they must all exist, or an error will be thrown.
Closes ENG-1753.