You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@usergrid.apache.org by "Lynch Lee (JIRA)" <ji...@apache.org> on 2016/11/12 04:20:58 UTC
[jira] [Commented] (USERGRID-1201) Error returned when calling
/revoketokens on non-existent user should be improved
[ https://issues.apache.org/jira/browse/USERGRID-1201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15658970#comment-15658970 ]
Lynch Lee commented on USERGRID-1201:
-------------------------------------
[~brandonshelley]
I think, if someone provided a non-existent user in his/her url for requesting some resources, we should give an error with http code '404' instead of 400, and the body will be :
{nofomat}
{
"error":"application_user_not_found",
"timestamp":1478924211463,
"duration":38,
"error_description":"user not found.",
"exception":"org.apache.usergrid.management.exceptions.ApplicationUserNotFoundException"
}
{nofomat}
Also, an exception named org.apache.usergrid.management.exceptions.ApplicationUserNotFoundException created for this case.
Do you agree with me ??
> Error returned when calling /revoketokens on non-existent user should be improved
> ---------------------------------------------------------------------------------
>
> Key: USERGRID-1201
> URL: https://issues.apache.org/jira/browse/USERGRID-1201
> Project: Usergrid
> Issue Type: Improvement
> Components: Stack
> Affects Versions: 2.2.0
> Reporter: Brandon Shelley
> Fix For: 2.2.0
>
>
> When calling PUT /revoketokens on a non-existent user, e.g.:
> {code}PUT https://api-connectors-prod.apigee.net/appservices/api-connectors/sdksandbox/users/asdf/revoketokens{code}
> This error is returned:
> {code}400 Bad Request
> {
> "error": "illegal_argument",
> "timestamp": 1452306435173,
> "duration": 0,
> "error_description": "applicationId, principal_type and id are required",
> "exception": "java.lang.IllegalArgumentException"
> }{code}
> This error description doesn't really describe what the problem is; at first glance, it looks more like a server error that isn't handled properly.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)