Net::HTTPTooManyRequests
See original GitHub issueimport_extra.rb実行時に Net::HTTPTooManyRequests
が出る場合があるようです。適宜ウェイトを挟む必要があるかもしれません。
.
.
.
importing zigokukayo...
importing mekarauroko...
importing donokyaraerabimasuka...
Traceback (most recent call last):
7: from import_extra.rb:87:in `<main>'
6: from import_extra.rb:15:in `import_decomojis'
5: from import_extra.rb:55:in `upload_decomojis'
4: from import_extra.rb:55:in `each'
3: from import_extra.rb:69:in `block in upload_decomojis'
2: from /usr/lib/ruby/gems/2.5.0/gems/mechanize-2.7.5/lib/mechanize.rb:536:in `post'
1: from /usr/lib/ruby/gems/2.5.0/gems/mechanize-2.7.5/lib/mechanize.rb:1323:in `post_form'
/usr/lib/ruby/gems/2.5.0/gems/mechanize-2.7.5/lib/mechanize/http/agent.rb:323:in `fetch': 429 => Net::HTTPTooManyRequests for https://....slack.com/api/emoji.add -- unhandled response (Mechanize::ResponseCodeError)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:5 (5 by maintainers)
Top Results From Across the Web
429 Too Many Requests - HTTP - MDN Web Docs
The HTTP 429 Too Many Requests response status code indicates the user has sent too many requests in a given amount of time...
Read more >How to Fix 429 Too Many Requests Error - Kinsta
The HTTP 429 error is returned when too many requests are made to a page within a short period of time. Find out...
Read more >429 Error – Too Many Requests HTTP Code Explained
The 429 error is an HTTP status code. It tells you when the use of an internet resource has surpassed the number of...
Read more >Handling the “HTTP 429 – Too Many Requests” error when ...
The HTTP 429 - Too Many Requests response status code indicates the user has sent too many requests in a given amount of...
Read more >HttpStatusCode is missing code 429 (TooManyRequests)
Net.Primitives referenced is missing status code 429 Here is th... ... <summary>Contains the values of status codes defined for HTTP.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
便利なプロダクトを開発してくださりありがとうございます! TooManyRequestsのヘッダの
retry-after
の時間(2 or 3 sec?)だけsleepするようにしましたが、@syguerさんの仰る通り一度TooManyRequestsに引っかかると再ログインしない限り毎回引っかかるようになりますね。。。(3000個あったら単純計算で2時間くらいかかります。。。) とりあえず、2段階認証の場合は上記の方法で、それ以外では自動で再ログインするようにしてみましたので、PR投げておきます!@tockn さんが改修してくれたスクリプトですと、手元の環境では TooManyRequests が発生しないようになった感じがします。
一応解決したと皆して本件はCloseします。
皆さま、ありがとうございました。