Skip to content

Commit

Permalink
RANGER-5146: 500 API Error When Deleting TagDef with a Linked Tag
Browse files Browse the repository at this point in the history
(cherry picked from commit ff36aab)
  • Loading branch information
dineshkumar-yadav authored and mneethiraj committed Feb 21, 2025
1 parent 648a09c commit 30b9f91
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ public WebApplicationException createRESTException(int responseCode,
VXResponse response = new VXResponse();

response.setMsgDesc(logMessage);
response.setStatusCode(responseCode);

Response errorResponse = Response
.status(responseCode).entity(response).build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ public RangerTagDef updateTagDef(@PathParam("id") Long id, RangerTagDef tagDef)

@DELETE
@Path(TagRESTConstants.TAGDEF_RESOURCE + "{id}")
@Produces("application/json")
@PreAuthorize("hasRole('ROLE_SYS_ADMIN')")
public void deleteTagDef(@PathParam("id") Long id) {
if(LOG.isDebugEnabled()) {
Expand All @@ -232,6 +233,7 @@ public void deleteTagDef(@PathParam("id") Long id) {

@DELETE
@Path(TagRESTConstants.TAGDEF_RESOURCE + "guid/{guid}")
@Produces("application/json")
@PreAuthorize("hasRole('ROLE_SYS_ADMIN')")
public void deleteTagDefByGuid(@PathParam("guid") String guid) {
if(LOG.isDebugEnabled()) {
Expand Down

0 comments on commit 30b9f91

Please sign in to comment.