Skip to content

getSegments throws java.lang.IllegalStateException #4

@buttash

Description

@buttash

I am using getSegments and the api throws the following:

Exception error: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 14 path $.segments

My code snippet is:

        try {
            ContactsApi api = new ContactsApi();
            Long limit = 50l;
            Long offset = 0l;
            String sort = "asc";
            GetSegments response = api.getSegments(limit, offset, sort);
        } catch (Exception e) {
            TaskLogging.warn(String.format("Exception error: %s ", e.getMessage()));
        }
`

Any idea what I'm doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions