Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic in older versions of consul #184

Closed
lwhile opened this issue Dec 13, 2017 · 0 comments
Closed

Panic in older versions of consul #184

lwhile opened this issue Dec 13, 2017 · 0 comments

Comments

@lwhile
Copy link

lwhile commented Dec 13, 2017

The code below will cause panic in older versions of consul:

endpoints := []string{"http://127.0.0.1:8500"}
libkv.AddStore(store.CONSUL, consul.New)
store, err := libkv.NewStore(store.CONSUL, endpoints, nil)
panic: interface conversion: http.RoundTripper is nil, not *http.Transport [recovered]
panic: interface conversion: http.RoundTripper is nil, not *http.Transport
...
github.com/hashicorp/consul/api.NewClient(0xc4200942c0, 0x1, 0x1, 0x17)

The consul code that causes panic is: https://github.com/hashicorp/consul/blob/ae6bf56ee116fea921567d681067f920e7fc377b/api/api.go#L404

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant