[ https://issues.apache.org/jira/browse/NIFI-12875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gregory M. Foreman updated NIFI-12875: -------------------------------------- Status: Patch Available (was: Open) > RestLookupService not handling HTTP 4xx/5xx error codes > ------------------------------------------------------- > > Key: NIFI-12875 > URL: https://issues.apache.org/jira/browse/NIFI-12875 > Project: Apache NiFi > Issue Type: Bug > Affects Versions: 2.0.0-M2 > Reporter: Gregory M. Foreman > Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > 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. -- This message was sent by Atlassian Jira (v8.20.10#820010)