Skip to content

Commit

Permalink
HADOOP-12795. KMS does not log detailed stack trace for unexpected er…
Browse files Browse the repository at this point in the history
…rors. Contributed by Chris Nauroth.
  • Loading branch information
cnauroth committed Feb 12, 2016
1 parent 23f937e commit 70c756d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hadoop-common-project/hadoop-common/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1695,6 +1695,9 @@ Release 2.8.0 - UNRELEASED
"hadoop.workaround.non.threadsafe.getpwuid" is different between
core-default.xml and NativeIO.java (Akira AJISAKA via cmccabe)

HADOOP-12795. KMS does not log detailed stack trace for unexpected errors.
(cnauroth)

Release 2.7.3 - UNRELEASED

INCOMPATIBLE CHANGES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,14 @@ public Response toResponse(Exception exception) {
status = Response.Status.FORBIDDEN;
} else if (exception instanceof IOException) {
status = Response.Status.INTERNAL_SERVER_ERROR;
log(status, throwable);
} else if (exception instanceof UnsupportedOperationException) {
status = Response.Status.BAD_REQUEST;
} else if (exception instanceof IllegalArgumentException) {
status = Response.Status.BAD_REQUEST;
} else {
status = Response.Status.INTERNAL_SERVER_ERROR;
log(status, throwable);
}
if (doAudit) {
KMSWebApp.getKMSAudit().error(KMSMDCFilter.getUgi(),
Expand Down

0 comments on commit 70c756d

Please sign in to comment.