Skip to content

[PUBLIC API] HTTP 5xx errors #177

@irfan-dahir

Description

@irfan-dahir

Do your error responses resemble this?

image
image


This has become a very reoccurring issue since the past few months so I'll pin it for once and leave an official statement about it here.

The issue

This is an issue caused by a MAL bad response. It's when MAL takes way too long to respond and/or returns a blank response. This could be due to overwhelming traffic by our IP connections.

The Jikan HTTP client thus returns errors like

  • Status code must be an integer value between 1xx and 5xx.
  • The HTTP status code "0" is not valid.

This issue is affecting both API versions v3 and v4. However, less on v4 as it's querying most results from a database instead.

What I'm doing to resolve it

  1. Cache v3 responses for a long period of time
  2. Discontinuing v3 in favor of v4 - I'll be announcing a timeline in February
  3. Created v4 which favors a database querying strategy for many API calls unlike v3 which uses an in-memory set/get caching strategy

What you should do to help resolve it

  1. If you are on v3, I suggest switching on v4 where these errors are less frequent and will become minimal once v3's discontinued.

  2. Cache client-side if you aren't already

  3. The success rate of the request is very high if you re-request it right after it fails.


Hope that helps!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions