Proper error codes
Right now, if an API call fails, we can only rely on the HTTPS status to know what could have gone wrong.
While on few endpoints a 400 status can be caused by only one kind of error, for most endpoints such status can be caused by multiple kind of errors.
For example, the reward creation endpoint ( https://dev.twitch.tv/docs/api/reference/#create-custom-rewards ) thorws a 400 if any input is wrong. There are 11 cases listed.
The only detail we have is an english text explaining what went wrong which we cannot do much with but display it as is to the user.
This does not allow us to provide proper UX.
Let's say I have a reward creation form, if I want to highlight the errored field depending on the endpoint result, or let's say I want to localize the error message, that's not something possible to date.
Having a property like "error_code" containing an ID would help solving such cases.
For example, the reward creation endpoint could send codes like these:
MISSINGTITLE
AUTOMODTITLE
INVALIDCOST
PROMPTTOO_LONG
...