Flowdock
v2.3.8 - Show latest stable - 0 notes - Superclass: Object
  • 1.0.0
  • 1.1.6
  • 1.2.6
  • 2.0.3
  • 2.1.0
  • 2.2.1
  • 2.3.8 (0)
  • 3.0.0
  • 3.0.9
  • 3.1.0
  • 3.2.1
  • 3.2.8
  • 3.2.13
  • 4.0.2
  • 4.1.8
  • 4.2.1
  • 4.2.7
  • 4.2.9
  • 5.0.0.1
  • 5.1.7
  • 5.2.3
  • 6.0.0
  • 6.1.3.1
  • 6.1.7.7
  • 7.0.0
  • 7.1.3.2
  • What's this?

The Failsafe middleware is usually the top-most middleware in the Rack middleware chain. It returns the underlying middleware’s response, but if the underlying middle raises an exception then Failsafe will log the exception into the Rails log file, and will attempt to return an error message response.

Failsafe is a last resort for logging errors and for telling the HTTP client that something went wrong. Do not confuse this with the ActionController::Rescue module, which is responsible for catching exceptions at deeper levels. Unlike Failsafe, which is as simple as possible, Rescue provides features that allow developers to hook into the error handling logic, and can customize the error message response based on the HTTP client’s IP.

Show files where this class is defined (1 file)
Register or log in to add new notes.