-
Notifications
You must be signed in to change notification settings - Fork 50
Description
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.