[ https://issues.apache.org/jira/browse/RANGER-4545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pradeep Agrawal updated RANGER-4545: ------------------------------------ Attachment: 0001-RANGER-4545-DELETE-assets-resources-resource_id-API-.patch > DELETE /assets/resources/{resource_id} API should return proper status code > for non admin users > ----------------------------------------------------------------------------------------------- > > Key: RANGER-4545 > URL: https://issues.apache.org/jira/browse/RANGER-4545 > Project: Ranger > Issue Type: Bug > Components: Ranger > Reporter: Abhishek > Assignee: Pradeep Agrawal > Priority: Major > Attachments: > 0001-RANGER-4545-DELETE-assets-resources-resource_id-API-.patch > > > When a non admin user makes a DELETE request to > /assets/resources/\{resource_id} endpoint, 405 method not allowed response is > returned. > The error message also contains HTML response. > {code:java} > <!doctype html><html lang="en"> > <head> <title>HTTP Status 405 ? Method Not Allowed</title> <style > type="text/css"> body { font-family: Tahoma, Arial, > sans-serif; } > h1, h2, h3, b { color: white; > background-color: #525D76; } > h1 { font-size: 22px; } > h2 { font-size: 16px; } > h3 { font-size: 14px; } > p { font-size: 12px; } > a { color: black; } > .line { height: 1px; background-color: #525D76; > border: none; } </style></head> > <body> <h1>HTTP Status 405 ? Method Not Allowed</h1></body> > </html> {code} > The status code / error message is not explanatory as ideally, a 403 > Forbidden or a 400 Bad Request status code with appropriate error message > should be returned as the error should be related to the user permission. -- This message was sent by Atlassian Jira (v8.20.10#820010)