[ 
https://issues.apache.org/jira/browse/HDFS-2428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13124613#comment-13124613
 ] 

Arpit Gupta commented on HDFS-2428:
-----------------------------------

Rename request leads to a 500 when the dstPath is null. We should return a 400


{code}
Request URI 
http://NN:50070/webhdfs/tmp/webhdfs_data/dir_with_children_to_be_renamed?op=RENAME&dstPath=
Request Method: PUT
Status Line: HTTP/1.1 500 Internal Server Error
Response Content: 
{"RemoteException":{"className":"java.lang.IllegalArgumentException","message":"Can
 not create a Path from a null string"}}
{code}

The content is correct but we should return a 400 instead of a 500

                
> webhdfs api parameter validation should be better
> -------------------------------------------------
>
>                 Key: HDFS-2428
>                 URL: https://issues.apache.org/jira/browse/HDFS-2428
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 0.20.205.0
>            Reporter: Arpit Gupta
>
> PUT Request: http://localhost:50070/webhdfs/some_path?op=MKDIRS&permission=955
> Exception returned
> HTTP/1.1 500 Internal Server Error
> {"RemoteException":{"className":"com.sun.jersey.api.ParamException$QueryParamException","message":"java.lang.NumberFormatException:
>  For input string: \"955\""}} 
> We should return a 400 with appropriate error message

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to