So, going to http://localhost:3000/%ED
will throw ActionController::BadRequest
.
But what I really want if return a 404 page (like most websites do).
For instance, Twitter will say:
Invalid Unicode value in one or more parameters /%ED
And me I get that in development (and a 500 error page in production):
I tried the obvious rescue_from
but the error doesn't even it my application as it's raised in the routing stack.
Any idea? I thought about a middleware but doesn't know how I would do it?
I used utf8-cleaner
and it works really fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With