From b9be3da2bc581292c2f2e514adb6b79901c6be0d Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Thu, 1 Dec 2016 10:22:32 -0800 Subject: [PATCH] Fix nil value panic when Consul returns a user error (#2145) --- builtin/logical/consul/path_token.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/logical/consul/path_token.go b/builtin/logical/consul/path_token.go index ee4b155c91..bce276d517 100644 --- a/builtin/logical/consul/path_token.go +++ b/builtin/logical/consul/path_token.go @@ -52,7 +52,7 @@ func (b *backend) pathTokenRead( return nil, intErr } if userErr != nil { - return logical.ErrorResponse(err.Error()), nil + return logical.ErrorResponse(userErr.Error()), nil } // Generate a name for the token