Generally Authorization & Content-Type (application/json) for Post / Patch (HTTP 1.1).
The reason I was asking is that I have a feeling it is related to attachments / photos fields and server-side time-outs only. So I was figuring it might have been some sort of internal error forwarding that’s not converted or something.
But the problem might just as well be me too of course. :slightly_smiling_face:
Yeah, that’s probably it. We only look at content-type and if it’s not set, you’d get HTML. GET requests may or may not include content-type as it should be sending no content. There was a recent patch for that to airtable.js.
I think we’ll need to change it to just never return HTML for api.airtable.com. Our API always returns JSON anyway.
After adding the Accept header (to application/json) I’m still getting HTML with 504’s & 502’s. The weird thing is that sometimes the 502’s come in JSON. I’ve already double checked my code, but I’m pretty sure my calls are consistent.
Since these are both time-out errors could it be something in the processing (order?) on your side or can I try other headers / combinations?
<h1 class="my2">This page is taking too long to load.</h1> <h3 class="quiet">Sorry about that. Please try refreshing and contact us if the problem persists.</h3>
I’ve long suspected something like this. I get strange errors when I create sync scripts that depend on results from Airtable. I have error handling coded in, however it seems that at times I get a result that isn’t an error yet isn’t expected content. Anyway, just chiming in so that I get pinged on updates to this thread. I guess I need to dial in my response-error-checking some more. Thanks Tuur for digging deeper!