You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
this lib cannot account for any server response, since there's not really a standard on how server should respond.
since server did not return the actual results I believe it's working as intended.
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.
The text was updated successfully, but these errors were encountered: