24

Twitch returning errors with 200 status code

WHY
ARE
YOU
WRITING
CODE

Comments
  • 8
    @theKarlisK maybe we should add another status code for http

    209 - OK with warnings
  • 9
    This is not to uncommon
    Before REST like apis became the norm it was normal that you never manually triggered http errors for your internal problems in apis since you return an error object the client would handle.

    Some older http clients would not process the payload of 4xx or 5xx returns so a 200 with an error was the most reliable way to actually return details of the error.

    But its been more than 15 years since that really still was a problem ;)
  • 0
    @Voxera cross-origin requests handle 5XX as a network error AFAIK, but 4XX are now returned to the application code in pretty much all cases.
  • 1
    Man, that's an awful response structure
  • 2
    @lbfalvy today yes, but go back 10-15 years
Add Comment