Skip to content

Gateway Timeout Returns Empty Array #219

@dulu93

Description

@dulu93

I just ran into an error on a very slow server where I tried to call client.fetchCalendarObjects on a large calendar.

The server returned a 504 Gateway Timeout.
I was expecting that the promise would be rejected and I would have to catch the error, but the promise resolved with an empty array as result.

I was skimming through the code and found in the function collectionQuery a part of the code which is most likely causing this issue:

// empty query result if (queryResults.length === 1 && !queryResults[0].raw) { return [] }
In this case queryResults has a length of 1 and that one element carries the response status.

href: <XXXX> ok: false raw: <gateway html code> status: 504 statusText: "Gateway Time-out"

Is this intended behaviour or do I miss something while calling the fetchCalendarObjects function?

Best Regards and thanks for keeping the good work up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions