ignore ClientAbortException
This commit is contained in:
parent
c82934fa29
commit
4b9b699b7f
1 changed files with 9 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue