From 4f425b641cbba82c313dcd6cf872755c7c323277 Mon Sep 17 00:00:00 2001 From: Ashutosh Gupta Date: Mon, 20 Jun 2022 06:14:47 +0100 Subject: [PATCH] YARN-9827.Fix Http Response code in GenericExceptionHandler (#4393) Co-authored-by: Ashutosh Gupta Reviewed by Akira Ajisaka. --- .../apache/hadoop/yarn/webapp/GenericExceptionHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/GenericExceptionHandler.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/GenericExceptionHandler.java index 2bad02c9f0..b8fc9e0054 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/GenericExceptionHandler.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/GenericExceptionHandler.java @@ -93,8 +93,8 @@ public Response toResponse(Exception e) { && 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