Uploaded image for project: 'Repose'
  1. REP-5885

Don't return a 200 on failed requests when Errors are thrown

    Details

    • Type: Story
    • Status: Resolved (View workflow)
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 8.7.0.0
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Sprint 150
    • Story Points:
      1
    • Capitalizable:
      True

      Description

      The original story, REP-5116 Resolved , assumed this would be a simple update of the Jetty version. That turned out to not be the case. This will probably need to wait until after REP-5616 Resolved so the Jetty version is brought up to the latest minor version, currently v9.4.x.

      As Bill discovered, the PowerFilter catches Exception, but not Throwable. Therefore, Errors bubble up to Jetty, but only after the PowerFilter commits the response. The result is Jetty returning a 200. Here is the relevant code:
      https://github.com/rackerlabs/repose/blob/master/repose-aggregator/core/repose-core/src/main/java/org/openrepose/powerfilter/PowerFilter.java#L426-L428

      The PowerFilter should catch a Throwable, to ensure that Repose responds with a 500 on Error as well. We should also ignore the Sonar warning about catching Throwable.

      We should consider the implications of catching Throwable.

      Acceptance Criteria:

      • Repose returns a BAD GATEWAY (502) when an Error is thrown.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                damien.johnson Damien Johnson
                Reporter:
                wdschei Bill Scheidegger
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: