Search failed and "403 For bidden" is displayed
eijenson opened this issue · comments
koba-mako commented
Hi.
Thank you very good tool!
It fails with this command(Not necessarily)
$ ghkw heigth height
results:
403 Forbidden
& {%! s (* http.gzipReader = & {0xc420060400 0xc420150580 <nil>})%! s (func () = <nil>)}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code = 0 × 1 addr = 0 × 0 pc = 0 × 1291 e 67]
goroutine 52 [running]:
main. (* Searcher) .searchRequest (0xc4201802e0, 0x7ffeefbffb0c, 0x6, 0xc42007c240)
/Users/XXXX/go/src/github.com/kyoshidajp/ghkw/cli.go:134 + 0x2a7
created by main. (* Searcher) .search
/Users/XXXX/go/src/github.com/kyoshidajp/ghkw/cli.go:144 + 0xbf
Note: XXXX is probably your user name.
Running it several times may succeed.
YOSHIDA Katsuhiko commented
Thanks for your detail report.
I guess that this is probably over the limit of GitHub API limitation.
By the way, the problem code about this is here.
https://github.com/kyoshidajp/ghkw/blob/v0.0.1/cli.go#L127-L129
If got error code, then should stop goroutine function which searches request safely.
YOSHIDA Katsuhiko commented
And similar to #3
YOSHIDA Katsuhiko commented
Search API returns X-RateLimit-Remaining header which is over one when got 403 error.
I've posted this issue at a community forum.