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

Lynch Lee commented on USERGRID-1178:
-------------------------------------

Well, I checkout code on branch master and tried to reproduce it locally, but 
got 405  instead of 500.

{noformat}
curl -XPUT "http://localhost:8080/belo/chatdemo/token"; -d 
'{"username":"xiaomugua","password": "123456","grant_type":"password"}'
{noformat}

{noformat}
{"error":"not_allowed","timestamp":1478932396486,"duration":1,"error_description":"HTTP
 405 Method Not Allowed","exception":"javax.ws.rs.NotAllowedException"}
{noformat}

And

Well, I checkout code on branch 2.1.0 and tried to reproduce it locally, but 
got 500.

{noformat}
curl -XPUT "http://localhost:8080/belo/chatdemo/token"; -d 
'{"username":"xiaomugua","password": "123456","grant_type":"password"}'
{noformat}

{noformat}
{"error":"uncaught","timestamp":1478935108626,"duration":0,"error_description":"Internal
 Server 
Error","exception":"org.apache.usergrid.rest.exceptions.UncaughtException","error_id":"35759866-a8a8-11e6-b198-00909e9aa8ed"}
{noformat}

But, should we fix this on branch 2.1.0 as a patch , because it has been 
released over.

> Making a PUT request to /token endpoints returns a 500 Internal Server Error
> ----------------------------------------------------------------------------
>
>                 Key: USERGRID-1178
>                 URL: https://issues.apache.org/jira/browse/USERGRID-1178
>             Project: Usergrid
>          Issue Type: Bug
>          Components: Stack
>    Affects Versions: 2.1.0
>            Reporter: Brandon Shelley
>            Priority: Minor
>
> When making a PUT request with a working token request body (instead of a 
> POST) Usergrid throws a 500 back instead of a 400 bad request.
> E.g.:
> {code}PUT 
> https://api-connectors-prod.apigee.net/appservices/api-connectors/sdksandbox/token
>  {"username": "someuser", "password": "mypassword", "grant_type": 
> "password"}{code}
> Returns:
> {code}{
>     "error": "uncaught",
>     "timestamp": 1449686731484,
>     "duration": 0,
>     "error_description": "Internal Server Error",
>     "exception": "org.apache.usergrid.rest.exceptions.UncaughtException",
>     "error_id": "062971c8-9ea5-11e5-b0d4-12aee0c06a45"
> }{code}



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

Reply via email to