ignore ClientAbortException

This commit is contained in:
Shinsuke Sugaya 2015-11-26 12:37:00 +09:00
parent c82934fa29
commit 4b9b699b7f

View file

@ -116,11 +116,15 @@ public class EsApiManager extends BaseApiManager {
CopyUtil.copy(in, out);
} catch (final ClientAbortException e) {
logger.debug("Client aborts this request.", e);
} catch (final IOException e) {
try (InputStream err = con.getErrorStream()) {
logger.error(new String(InputStreamUtil.getBytes(err), Constants.CHARSET_UTF_8));
} catch (final IOException e1) {}
throw new WebApiException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e);
} catch (final Exception e) {
if (e.getCause() instanceof ClientAbortException) {
logger.debug("Client aborts this request.", e);
} else {
try (InputStream err = con.getErrorStream()) {
logger.error(new String(InputStreamUtil.getBytes(err), Constants.CHARSET_UTF_8));
} catch (final IOException e1) {}
throw new WebApiException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e);
}
}
});
}