You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by pr...@apache.org on 2022/06/20 05:14:53 UTC
[hadoop] branch trunk updated: YARN-9827.Fix Http Response code in GenericExceptionHandler (#4393)
This is an automated email from the ASF dual-hosted git repository.
prabhujoseph pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new 4f425b641cb YARN-9827.Fix Http Response code in GenericExceptionHandler (#4393)
4f425b641cb is described below
commit 4f425b641cbba82c313dcd6cf872755c7c323277
Author: Ashutosh Gupta <as...@st.niituniversity.in>
AuthorDate: Mon Jun 20 06:14:47 2022 +0100
YARN-9827.Fix Http Response code in GenericExceptionHandler (#4393)
Co-authored-by: Ashutosh Gupta <as...@amazon.com>
Reviewed by Akira Ajisaka.
---
.../java/org/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 2bad02c9f08..b8fc9e00541 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 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
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org