5
0
Fork 0
mirror of https://github.com/hashicorp/vault-action.git synced 2025-11-10 00:26:55 +00:00

Retry on 412 status codes

This commit is contained in:
Tom Proctor 2022-06-15 13:40:06 +01:00
parent ad04ab9377
commit 1bcd0991cf
No known key found for this signature in database
GPG key ID: 9AA1838744D16345
2 changed files with 13 additions and 1 deletions

View file

@ -1,5 +1,9 @@
## Unreleased
Bugs:
* Errors due to replication delay for tokens will now be retried [GH-333](https://github.com/hashicorp/vault-action/pull/333)
## 2.4.1 (April 28th, 2022)
Improvements:

View file

@ -26,7 +26,15 @@ async function exportSecrets() {
const defaultOptions = {
prefixUrl: vaultUrl,
headers: {},
https: {}
https: {},
retry: {
statusCodes: [
...got.defaults.options.retry.statusCodes,
// Vault returns 412 when the token in use hasn't yet been replicated
// to the performance replica queried. See issue #332.
412,
]
}
}
const tlsSkipVerify = (core.getInput('tlsSkipVerify', { required: false }) || 'false').toLowerCase() != 'false';