[
https://issues.apache.org/jira/browse/RANGER-3847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17605131#comment-17605131
]
Ramachandran commented on RANGER-3847:
--------------------------------------
In Ranger rest API if you pass an Invalid attribute type in the JSON request
body, it throws a 404 error instead of 400 (Bad Request). It seems a bug where
we need to handle the JsonMappingException by adding Exception Mapper cc >>
[[email protected]]
> [Ranger] : Http status & Error message is not correct for /xaudit/trx_log
> -------------------------------------------------------------------------
>
> Key: RANGER-3847
> URL: https://issues.apache.org/jira/browse/RANGER-3847
> Project: Ranger
> Issue Type: Bug
> Components: Ranger
> Reporter: Anupam Rai
> Priority: Minor
>
> [Ranger] : Http status & Error message is not correct for /xaudit/trx_log
> Request with bad request : Passing String values
> {code:java}
> curl --location --request POST
> 'https://quasar-daqgbo-1.quasar-daqgbo.root.hwx.site:6182/service/xaudit/trx_log'
> \
> --header 'Authorization: Basic aHJ0X3FhOlBhc3N3b3JkQDEyMw==' \
> --header 'Accept: application/json' \
> --header 'Content-Type: application/json' \
> --data-raw '{
> "objectClassType" : "abcdef",
> "objectId" : "abcdef"
> }' {code}
> Response : 404 Not Found
> Request with proper request : Passing int values
> {code:java}
> curl --location --request POST
> 'https://quasar-daqgbo-1.quasar-daqgbo.root.hwx.site:6182/service/xaudit/trx_log'
> \
> --header 'Authorization: Basic aHJ0X3FhOlBhc3N3b3JkQDEyMw==' \
> --header 'Accept: application/json' \
> --header 'Content-Type: application/json' \
> --data-raw '{
> "objectClassType" : "123456",
> "objectId" : "1234567"
> }' {code}
> Response : ok
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)