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

Improve KeyVault errors #24

Open
danielfsousa opened this issue Oct 2, 2019 · 1 comment
Open

Improve KeyVault errors #24

danielfsousa opened this issue Oct 2, 2019 · 1 comment

Comments

@danielfsousa
Copy link
Collaborator

When a key vault secret is not found dotenv-azure throws the following error:

Error: Secret not found: SecretName/55f53bc304ad46f29dc059c1bf7468b4
    at new RestError (~/jazida-scripts/node_modules/@azure/core-http/lib/restError.ts:18:5)
    at ~/jazida-scripts/node_modules/@azure/core-http/lib/policies/deserializationPolicy.ts:117:27
    at Promise.propagateAslWrapper (~/jazida-scripts/node_modules/async-listener/index.js:504:23)
    at Promise.__asl_wrapper (~/jazida-scripts/node_modules/async-listener/glue.js:188:31)
    at proxyWrapper (~/jazida-scripts/node_modules/async-listener/index.js:529:23)
    at ~/jazida-scripts/node_modules/async-listener/index.js:541:70
    at ~/jazida-scripts/node_modules/async-listener/glue.js:188:31

We should create a KeyVaultError and throw after all key vault requests are completed, so we can inform all the missing secrets once.

@danielfsousa danielfsousa changed the title Improve KeyVault erros Improve KeyVault errors Oct 2, 2019
@danielfsousa danielfsousa reopened this Nov 7, 2019
@danielfsousa
Copy link
Collaborator Author

Also, if CLIENT_ID, CLIENT_SECRET and/or TENANT_ID are missing/invalid the error Request is missing a Bearer or PoP token. is thrown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant