Clarify X-Cascade header in ShowExceptions middleware [ci-skip]
Clarify that the middleware looks at the `X-Cascade` header in the response. Co-authored-by: Hartley McGuire <skipkayhil@gmail.com>
This commit is contained in:
parent
1173d2ce04
commit
72c5a69b5f
@ -16,10 +16,11 @@ module ActionDispatch
|
||||
# In \Rails applications, the exceptions app can be configured with
|
||||
# +config.exceptions_app+, which defaults to ActionDispatch::PublicExceptions.
|
||||
#
|
||||
# If the application returns an <tt>"X-Cascade" => "pass"</tt> response, this
|
||||
# middleware will send an empty response as a result with the correct status
|
||||
# code. If any exception happens inside the exceptions app, this middleware
|
||||
# catches the exceptions and returns a failsafe response.
|
||||
# If the application returns a response with the <tt>X-Cascade</tt> header
|
||||
# set to <tt>"pass"</tt>, this middleware will send an empty response as a
|
||||
# result with the correct status code. If any exception happens inside the
|
||||
# exceptions app, this middleware catches the exceptions and returns a
|
||||
# failsafe response.
|
||||
class ShowExceptions
|
||||
def initialize(app, exceptions_app)
|
||||
@app = app
|
||||
|
Loading…
Reference in New Issue
Block a user