Skip to content

Commit

Permalink
RANGER-5089: Getting 204 instead of 404 status code when invalid serv…
Browse files Browse the repository at this point in the history
…ice name is passed

Signed-off-by: Dineshkumar Yadav <[email protected]>
  • Loading branch information
RakeshGuptaDev authored and dineshkumar-yadav committed Jan 6, 2025
1 parent 6dd1af9 commit 8a605be
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions security-admin/src/main/java/org/apache/ranger/rest/XUserREST.java
Original file line number Diff line number Diff line change
Expand Up @@ -1489,6 +1489,16 @@ public RangerUserStore getSecureRangerUserStoreIfUpdated(@PathParam("serviceName
Long downloadedVersion = null;

boolean isValid = false;
try {
isValid = serviceUtil.isValidService(serviceName, request);
} catch (WebApplicationException webException) {
httpCode = webException.getResponse().getStatus();
logMsg = webException.getResponse().getEntity().toString();
} catch (Exception e) {
httpCode = HttpServletResponse.SC_BAD_REQUEST;
logMsg = e.getMessage();
}

try {
XXService xService = rangerDaoManager.getXXService().findByName(serviceName);
if (xService != null) {
Expand Down

0 comments on commit 8a605be

Please sign in to comment.