Github user mike-jumper commented on a diff in the pull request:
https://github.com/apache/guacamole-client/pull/252#discussion_r167408776
--- Diff:
guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelServlet.java
---
@@ -256,14 +259,18 @@ else if(query.startsWith(WRITE_PREFIX))
// Catch any thrown guacamole exception and attempt to pass within
the
// HTTP response, logging each error appropriately.
- catch (GuacamoleClientException e) {
- logger.warn("HTTP tunnel request rejected: {}",
e.getMessage());
- sendError(response, e.getStatus(), e.getMessage());
- }
catch (GuacamoleException e) {
- logger.error("HTTP tunnel request failed: {}", e.getMessage());
- logger.debug("Internal error in HTTP tunnel.", e);
- sendError(response, e.getStatus(), "Internal server error.");
+ if (e instanceof GuacamoleClientException) {
--- End diff --
There's no need to manually check `instanceof` - this is exactly what
`catch` is for.
---