[ 
https://issues.apache.org/jira/browse/USERGRID-768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brandon Shelley updated USERGRID-768:
-------------------------------------
    Description: 
If I make the following call:

https://api.usergrid.com/org/app/collection?ql=where%20thirdPropertyTypeInt%20%3E%2030000%20&&%20thirdPropertyTypeInt%20%3C%2040000&limit=10

I get the response:

{code}
{
  "error": "null_pointer",
  "timestamp": 1435176848310,
  "duration": 1,
  "exception": "java.lang.NullPointerException"
}
{code}

The cause is that the ampersands in the request aren't url encoded (%26 instead 
of &). I would expect that if the query string is bad, we should be returning a 
400 Bad Request, rather than an ominous NullPointerException/500.

  was:
If I make the following call:

https://api.usergrid.com/brandon.apigee/baas-integration-tests/horses?ql=where%20thirdPropertyTypeInt%20%3E%2030000%20&&%20thirdPropertyTypeInt%20%3C%2040000&limit=10&client_id=b3U6GSgNxCS2EeOwVM0JG2EUFw&client_secret=b3U6-VN4JkhFUtEz4dzgswNMTNlDa_E

I get the response:

{code}
{
  "error": "null_pointer",
  "timestamp": 1435176848310,
  "duration": 1,
  "exception": "java.lang.NullPointerException"
}
{code}

The cause is that the ampersands in the request aren't url encoded (%26 instead 
of &). I would expect that if the query string is bad, we should be returning a 
400 Bad Request, rather than an ominous NullPointerException/500.


> Bad characters in query causes 500 response; expecting 400?
> -----------------------------------------------------------
>
>                 Key: USERGRID-768
>                 URL: https://issues.apache.org/jira/browse/USERGRID-768
>             Project: Usergrid
>          Issue Type: Bug
>            Reporter: Brandon Shelley
>            Priority: Minor
>
> If I make the following call:
> https://api.usergrid.com/org/app/collection?ql=where%20thirdPropertyTypeInt%20%3E%2030000%20&&%20thirdPropertyTypeInt%20%3C%2040000&limit=10
> I get the response:
> {code}
> {
>   "error": "null_pointer",
>   "timestamp": 1435176848310,
>   "duration": 1,
>   "exception": "java.lang.NullPointerException"
> }
> {code}
> The cause is that the ampersands in the request aren't url encoded (%26 
> instead of &). I would expect that if the query string is bad, we should be 
> returning a 400 Bad Request, rather than an ominous NullPointerException/500.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to