Fix nil value panic when Consul returns a user error (#2145)

This commit is contained in:
Jeff Mitchell 2016-12-01 10:22:32 -08:00 committed by GitHub
parent 577366ad9a
commit b9be3da2bc

View File

@ -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