YARN-9827.Fix Http Response code in GenericExceptionHandler (#4393)

Co-authored-by: Ashutosh Gupta <ashugpt@amazon.com>

Reviewed by Akira Ajisaka.
This commit is contained in:
Ashutosh Gupta 2022-06-20 06:14:47 +01:00 committed by GitHub
parent cfceaebde6
commit 4f425b641c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -93,8 +93,8 @@ public class GenericExceptionHandler implements ExceptionMapper<Exception> {
&& e.getCause() instanceof UnmarshalException) {
s = Response.Status.BAD_REQUEST;
} else {
LOG.warn("INTERNAL_SERVER_ERROR", e);
s = Response.Status.INTERNAL_SERVER_ERROR;
LOG.warn("SERVICE_UNAVAILABLE", e);
s = Response.Status.SERVICE_UNAVAILABLE;
}
// let jaxb handle marshalling data out in the same format requested