Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


ActionController::UrlGenerationError gets swallowed along with ActionController::RoutingError #14185

kenn opened this Issue · 3 comments

5 participants


I believe we usually do this to ignore client errors (mistyping the URL, etc.)

rescue_from ActionController::RoutingError, with: :render_404

But ActionController::UrlGenerationError inherits from ActionController::RoutingError and it gets swallowed as well, however it is actually a server / code error. It shouldn't be ignored. Maybe ActionController::RoutingError is too generic.

It's best if we had clearer super-classes like ServerError for 5xxx or ClientError for 4xx, etc.

Any ideas?

@sikachu sikachu added the actionpack label

:+1: I got bit by this. I think UrlGenerationError should just not inherit from RoutingError and trigger a 500.

@rails-bot rails-bot added the stale label

This issue has been automatically marked as stale because it has not been commented on for at least
three months.

The resources of the Rails team are limited, and so we are asking for your help.

If you can still reproduce this error on the 4-1-stable, 4-0-stable branches or on master,
please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions.


Fixed in #16229

@pixeltrix can you close this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.