Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7633807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:59:21+00:00 2026-05-31T06:59:21+00:00

How can i process errors generated by rack-throttle gem when rate limit is excedeed?

  • 0

How can i process errors generated by rack-throttle gem when rate limit is excedeed?
Now i just get a response containing the following:

Internal Server Error

undefined method `each' for "403 Forbidden (Rate Limit Exceeded)\n":String

Here is the stack trace

ERROR NoMethodError: undefined method `each' for "403 Forbidden (Rate Limit Exceeded)\n":String
/home/rkapitonov/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/query_cache.rb:45:in `each'
/home/rkapitonov/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:458:in `each'
/home/rkapitonov/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.6/lib/rack/body_proxy.rb:23:in `method_missing'
/home/rkapitonov/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/rack/content_length.rb:26:in `call'
/home/rkapitonov/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/rack/log_tailer.rb:14:in `call'
/home/rkapitonov/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.6/lib/rack/handler/webrick.rb:59:in `service'
/home/rkapitonov/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
/home/rkapitonov/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
/home/rkapitonov/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'

How can i process this error and render some custom file or make a redirect?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T06:59:22+00:00Added an answer on May 31, 2026 at 6:59 am

    Finally i found a solution

    The problem was in rack-throttle gem. Response body should be an array of strings, so to fix the issue i’ve just overridden http_error method and that did the trick for me.
    You should make http_status(code) + (message.nil? ? "\n" : " (#{message})\n") an array so just take it in square brackets.

    class Rack::Throttle::Limiter
      def http_error(code, message = nil, headers = {})
        [code, {'Content-Type' => 'text/plain; charset=utf-8'}.merge(headers),
        [http_status(code) + (message.nil? ? "\n" : " (#{message})\n")]]
      end
    end
    

    Put this inside config/initializers/rack_throttle.rb. The name of the file may be changed to whatever you like.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can i get a process by know process name on mac os?
I need to create a service which can process queued requests on a configured
how can i process all radio buttons from the page? <input type=radio name=radio_1 value=some
I know that in c# I can do: Process currentProcess = System.Diagnostics.Process.GetCurrentProcess(); currentProcess.Modules[0].BaseAddress currentProcess.Modules[0].EntryPointAddress
The following is 2 different definitions of the problem: How can I process 2
I have a defined number of servers that can locally process data in their
How can I use Process.Start(), but have the launched process not in the same
How can I run Process in C# ?
I can't understand the process described in documentation. It says to use event: procedure
How can I run a process while a timer is running in the program.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.