HTML response with 502 error from API end-point

It’s better to mention this in the documentation. But this subject still not about guarantees, but about specific error.

This is correct point, thank you. We can forget about JSON parsing error, it’s actually on me, but the problem still in HTML response. There should not be HTML response. Yes, it’s the server error, but it can be changed, as I wrote.

OK, I’ll try to post this issue and on User Voice, and on GitHub project, but funny there are no links to them in the “Getting help” section of docs:

API service designed to send HTML errors? Seriously, this is intentional behavior? I don’t think so. I think Twitch developers just left default and forget about this, because these are (I hope) rare cases.

I know. And this is unexpected error, yes. But… we can just change it, so let’s do it. And then resolve other specific, not unknown theoretic, errors properly. Maybe another change on the server side, maybe some catches at a client side.

I didn’t asked “how can I handle such errors?”. I know how to handle, I know that I can handle, I know that this is a good practice generally. But I have specific error and I’m sure that it’s better to resolve it on the server side.