Github user zentol commented on the issue: https://github.com/apache/flink/pull/4569 @tillrohrmann I've reworked the client response parsing: the `ClientHandler` now only parses the response as JSON, whereas the conversion to the respective `ResponseBody` is handled in a future declared in `RestClientHandler#submitRequest()`. With this the `ClientHandler` is once again immutable and we don't have to do any casts. I've also reworked how handlers communicate failures: The `HandlerResponse` classes have been removed, and handlers may now throw a (checked) `RestHandlerException` or complete the future with an exception (with special treating for RestHandlerExceptions). Unchecked or non-RestHandlerExceptions are still treated as implementation errors and will return a "500 Internal Server Error".
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---