You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@usergrid.apache.org by "George Reyes (JIRA)" <ji...@apache.org> on 2015/07/30 23:23:05 UTC
[jira] [Updated] (USERGRID-216) GET an non-exists entity by ID or
Name throws 401 if no authorisation is required
[ https://issues.apache.org/jira/browse/USERGRID-216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
George Reyes updated USERGRID-216:
----------------------------------
Sprint: Usergrid 27
Story Points: 2
> GET an non-exists entity by ID or Name throws 401 if no authorisation is required
> ---------------------------------------------------------------------------------
>
> Key: USERGRID-216
> URL: https://issues.apache.org/jira/browse/USERGRID-216
> Project: Usergrid
> Issue Type: Story
> Reporter: Strong Liu
> Assignee: George Reyes
>
> for example
> get /sandbox/users/non-exist-username throws 401 error code
> this is because below code
> {code}
> @Provider
> public class ServiceResourceNotFoundExceptionMapper extends AbstractExceptionMapper<ServiceResourceNotFoundException> {
> @Override
> public Response toResponse( ServiceResourceNotFoundException e ) {
> if ( SubjectUtils.getSubjectUserId() == null ) {
> return toResponse( UNAUTHORIZED, e );
> }
> else {
> return toResponse( NOT_FOUND, e );
> }
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)