Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-12875

Add Response Handling Strategy to RestLookupService

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0-M2
    • 2.0.0-M3
    • None
    • None

    Description

      The RestLookupService service does not handle HTTP error codes correctly.  If the web service being consumed returns a 4xx or 5xx error code, the RestLookupService service ignores the error and passes the response content to the record reader, causing unexpected exception reporting.

      Example: a web service that communicates with clients via JSON is behind a proxy.  The proxy returns a 502 error and responds with HTML content describing the error.  The RestLookupService uses a JsonTreeReader reader and attempts to parse the HTML characters.  This leads to it throwing an exception that it was unable to parse the '<' character.  The real reason is the proxy is sending back a 502 error, but this detail is hidden.

      Attachments

        Issue Links

          Activity

            People

              gforeman02 Gregory M. Foreman
              gforeman02 Gregory M. Foreman
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m