Skip to content

"Requested resource doesn't exist" when hitting scroll param #185

@jonnyom

Description

@jonnyom

Hitting the scroll() method on the User object returns a NotFoundException.

 public static List<User> scrollUsers(){
        ScrollableUserCollection usersScroll = User.scroll();
        List<User> users = new ArrayList<User>();
        while(usersScroll.scroll()!=null){
            users = usersScroll.getPage();
            usersScroll = usersScroll.scroll();
        }
        return users;
    }

    public static void main( String[] args )
    {
        Intercom.setToken(ACCESS_TOKEN);

        List<User> users = scrollUsers();
        for(User user: users){
            System.out.println(user.getId());
        }

    }

This code returns the following 👇

Exception in thread "main" io.intercom.api.NotFoundException: The requested resource does not exist; check your path and try again
	at io.intercom.api.HttpClient.throwException(HttpClient.java:208)
	at io.intercom.api.HttpClient.handleError(HttpClient.java:169)
	at io.intercom.api.HttpClient.runRequest(HttpClient.java:155)
	at io.intercom.api.HttpClient.executeHttpMethod(HttpClient.java:110)
	at io.intercom.api.HttpClient.get(HttpClient.java:86)
	at io.intercom.api.HttpClient.get(HttpClient.java:82)
	at io.intercom.api.DataResource.scroll(DataResource.java:75)
	at io.intercom.api.User.scroll(User.java:80)
	at ApiTest.scrollUsers(ApiTest.java:55)
	at ApiTest.main(ApiTest.java:79)

Where ApiTest.java:55 corresponds to ScrollableUserCollection usersScroll = User.scroll();

Version info

  • intercom-java version: 2.3.2

Steps to reproduce

  1. Create a new scroll
  2. Try to hit the scroll

Logs

Scroll isn't hitting the /users endpoint at all as it's not being reached

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions