From 72c5a69b5f5fb1384f52f2ab2dc4c2a88e020bd1 Mon Sep 17 00:00:00 2001 From: Petrik Date: Wed, 17 May 2023 17:16:42 +0200 Subject: [PATCH] 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 --- .../lib/action_dispatch/middleware/show_exceptions.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb index 732b4f9725..120f21652f 100644 --- a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb +++ b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb @@ -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 "X-Cascade" => "pass" 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 X-Cascade header + # set to "pass", 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