I’m running into an interesting issue while performing heavy queries.
If the call takes longer than 60 seconds, I get one of two responses from the server. Both are errors, and both are in HTML body. One is a general 504 timeout warning. The second one is returned the page text below. After watching the timing, this happens at exactly the 60 second mark, so the timeout seems to be 60 seconds from the server. I’m not seeing this mentioned anywhere on the documentation.
–returned page
This exposes a few critical issues and opportunities.
-
If the anticipated API response body is JSON, ALL API response bodies should be JSON. Every. Single. One. I think it is inappropriate to return a page body when there’s an error, instead of simply {“error”:“Server timeout. Maximum query duration is 60 seconds.”} or something similar displaying the reason for the error. We can always manage exceptions, however response body format should never vary like this.
-
I’m disappointed further that pagination doesn’t interrupt query timeouts. Return an error at data transmission if anticipated query call will result in greater than 60 seconds, or just complete the query and send the data.

