fix unnecessary error messages

This commit is contained in:
Xavier Léauté 2014-07-29 13:54:36 -07:00
parent 088e2c5af3
commit 25a5a0fd33
1 changed files with 3 additions and 3 deletions

View File

@ -72,8 +72,6 @@ public class AsyncQueryForwardingServlet extends AsyncProxyServlet
);
}
response.flushBuffer();
throw new IOException(exception);
}
private final ObjectMapper jsonMapper;
@ -132,15 +130,17 @@ public class AsyncQueryForwardingServlet extends AsyncProxyServlet
)
);
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
response.setContentType(QueryResource.APPLICATION_JSON);
objectMapper.writeValue(
response.getOutputStream(),
ImmutableMap.of("error", errorMessage)
);
throw e;
return;
}
catch (Exception e) {
handleException(response, objectMapper, e);
return;
}
}