Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gateway Timeout Returns Empty Array #219

Open
dulu93 opened this issue Sep 26, 2024 · 0 comments
Open

Gateway Timeout Returns Empty Array #219

dulu93 opened this issue Sep 26, 2024 · 0 comments

Comments

@dulu93
Copy link

dulu93 commented Sep 26, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant