diff --git a/client/client.go b/client/client.go index 8f11cbbaa..adf12496f 100644 --- a/client/client.go +++ b/client/client.go @@ -1754,7 +1754,7 @@ func (c *Client) deriveToken(alloc *structs.Allocation, taskNames []string, vcli var resp structs.DeriveVaultTokenResponse if err := c.RPC("Node.DeriveVaultToken", &req, &resp); err != nil { c.logger.Printf("[ERR] client.vault: DeriveVaultToken RPC failed: %v", err) - return nil, structs.NewWrappedServerError(resp.Error) + return nil, structs.NewWrappedServerError(err) } if resp.Error != nil { c.logger.Printf("[ERR] client.vault: failed to derive vault tokens: %v", resp.Error)