Comments (10)
thanks! looks like it works now. Tested v2.9.1
Must've been an invalid IP address because I'm getting expected result now. Error message is much better too when I pass in an invalid one.
from go.
Are you putting a real token and not getting rate limited? Either of these may cause the issue, but please do confirm.
from go.
I just checked and I was able to replicate the error if you put an empty string in the client as token then it throws this error
client := ipinfo.NewClient(nil, nil, "")
So putting the token should solve your issue.
cc: @UmanShahzad
from go.
I see. Can we fix so that it doesn't panic, and instead just returns an error?
from go.
I am using my real token - just redacted it for the post:
client := ipinfo.NewClient(nil, nil, "39b807185xxxxx")
Doesn't seem like I'm being rate limited - brand new account and testing with only a single IP in the request
from go.
I see. Can we fix so that it doesn't panic, and instead just returns an error?
I think a simple check on the token can solve this issue.
from go.
I am using my real token - just redacted it for the post:
client := ipinfo.NewClient(nil, nil, "39b807185xxxxx")
Doesn't seem like I'm being rate limited - brand new account and testing with only a single IP in the request
I am unable to replicate this error I've tried different scenarios and the only scenario giving me this error is when you pass ""
as token. I also noticed you are using SDK version 2.8.0
you can try updating to 2.9.0
meanwhile I'll look into it further and try to find the cause of this problem.
from go.
The error also occurs if we put an invalid IP in the batch request
batchResult, err := client.GetIPInfoBatch(
[]net.IP{
net.ParseIP("1.1.1.1"),
net.ParseIP("8.8.8.8"),
net.ParseIP(""),
}
from go.
Will do a patch release then you can try again.
from go.
@jcace just released v2.9.1
your error should be fixed in this patch.
Thank you for your feedback! 😃
from go.
Related Issues (20)
- Remove legacy checks for `undefined` with fields requests
- Implement `CountryName` function HOT 1
- Write tests
- Move to "go" repo HOT 1
- Support batch ops HOT 1
- Add types & support for abuse/privacy/hosted-domains data
- Add optional IP selection handler HOT 1
- Fix go mod path HOT 1
- Support for IP summarization HOT 1
- The link in the repository description is out of date HOT 4
- Use versioned cache key
- Map integration HOT 1
- Limit the number of simultaneous batch chunk reqs
- Excuse me. Does the library provide region code? HOT 1
- panics and errors when running `batch-*` examples HOT 1
- go get install method is deprecated HOT 1
- Create IsEU function on Core object
- Too many arguments in call to ipinfo.NewClient HOT 1
- 75678ef9c8a6e2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go.