diff --git a/client/vaultclient/vaultclient.go b/client/vaultclient/vaultclient.go index 701b2d479..a5d0f512c 100644 --- a/client/vaultclient/vaultclient.go +++ b/client/vaultclient/vaultclient.go @@ -249,7 +249,13 @@ func (c *vaultClient) DeriveToken(alloc *structs.Allocation, taskNames []string) // Use the token supplied to interact with vault c.client.SetToken("") - return c.tokenDeriver(alloc, taskNames, c.client) + tokens, err := c.tokenDeriver(alloc, taskNames, c.client) + if err != nil { + c.logger.Printf("[ERR] client.vault: failed to derive token for allocation %q and tasks %v: %v", alloc.ID, taskNames, err) + return nil, err + } + + return tokens, nil } // GetConsulACL creates a vault API client and reads from vault a consul ACL