ActionDispatch::ShowExceptions < Object
from /home/chedong/.local/share/rdoc
This middleware rescues any exception returned by the application and calls an exceptions app that will wrap it in a format for the end user.
The exceptions app should be passed as parameter on initialization of
ShowExceptions. Every time there is an exception,
ShowExceptions will store the exception in
env("action_dispatch.exception"), rewrite the
PATH_INFO to the exception status code and call the Rack
app.
If the application returns a "X-Cascade" pass response,
this middleware will send an empty response as result with the correct
status code. If any exception happens inside the exceptions app, this
middleware catches the exceptions and returns a
FAILSAFE_RESPONSE.
| Use Case | Command | Description |
|---|---|---|
| Rescue application exceptions | use ActionDispatch::ShowExceptions | 📦 Wraps exceptions in a user-friendly format |
| Configure custom exceptions app | config.exceptions_app = ->(env) { ... } | ⚙️ Provide a custom Rack app to handle exceptions |
| Access the original exception | env["action_dispatch.exception"] | 🔍 Retrieve the exception object from the environment |
FAILSAFE_RESPONSE — [not documented]newcallGenerated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-27 18:52 @216.73.216.199
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format