Improve consul secrets plugin error for failed bootstrap (#20891)

This commit is contained in:
Tom Proctor 2023-05-31 16:31:24 +01:00 committed by GitHub
parent a18b10ecae
commit 657ee3107a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -135,7 +135,7 @@ func (b *backend) pathConfigAccessWrite(ctx context.Context, req *logical.Reques
}
token, _, err := client.ACL().Bootstrap()
if err != nil {
return logical.ErrorResponse("Token not provided and failed to bootstrap ACLs"), err
return logical.ErrorResponse("Token not provided and failed to bootstrap ACLs: %s", err), nil
}
config.Token = token.SecretID
}

4
changelog/20891.txt Normal file
View file

@ -0,0 +1,4 @@
```release-note:improvement
secrets/consul: Improve error message when ACL bootstrapping fails.
```