RANGER-4720: Ranger Admin server gives empty response when user with user-role tries to update lastname or email address
diff --git a/security-admin/src/main/java/org/apache/ranger/common/RESTErrorUtil.java b/security-admin/src/main/java/org/apache/ranger/common/RESTErrorUtil.java
index ed3ed5e..c3af9f9 100644
--- a/security-admin/src/main/java/org/apache/ranger/common/RESTErrorUtil.java
+++ b/security-admin/src/main/java/org/apache/ranger/common/RESTErrorUtil.java
@@ -96,8 +96,11 @@
* @return
*/
public WebApplicationException create403RESTException(String logMessage) {
+ RESTResponse resp = new RESTResponse();
+ resp.setMsgDesc(logMessage);
+
Response errorResponse = Response.status(
- javax.servlet.http.HttpServletResponse.SC_FORBIDDEN).build();
+ javax.servlet.http.HttpServletResponse.SC_FORBIDDEN).entity(resp).build();
WebApplicationException restException = new WebApplicationException(
errorResponse);