`fetch_response` rejects HTTP 202 breaking IMDB oneboxes

IMDB currently returns HTTP 202 Accepted instead of 200 OK (likely due to anti-bot measures or asynchronous request handling). The current implementation is too strict since it only considers 200 a successful response and treats any other 2xx status as an error. As a result, the response body is never read and oneboxing fails with an “error code of 202” message:

This has a direct, user-visible impact whenever someone pastes an IMDB link into a post.

The fetch_response method currently accepts only HTTP 200 as a successful response. Any other 2xx status, including the 202, is passed to response.error!, causing the fetch to fail before the response body can be processed.

Can we accept the full range of successful HTTP status codes (2xx) instead of only 200?

1 Like