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 2015/07/25 05:23:04 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=14641371#comment-14641371 ]
Lynch Lee commented on USERGRID-216:
------------------------------------
It shouldn't need credentials so you got a 401 but 404 in the app named sandbox , right ??
> 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: Lynch Lee
>
> 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)