API Reference

Even cool kids make mistakes

Encountering various errors when working with APIs is common. However, with a proper understanding of the error and its status code, troubleshooting becomes easier.

Below is a table of all possible status codes and their respective descriptions specific to the RAWG API.

Status codeStatus descriptionDescription
200OKThis indicates that your request was successful.
401 UNAUTHORIZEDOccurs when an unauthorized parameter is present, such as an incorrect API Key.
404NOT FOUNDIndicates that the requested resource is not found or doesn't exist.

By following industry standards, you can infer the nature of an error based on the status code. For example, status codes starting with 2xx typically indicate success. Status codes in the 4xx range signify an error, accompanied by an error message as shown in the table above. Lastly, 5xx codes indicate server errors, although they are not common with RAWG.

Understanding status codes is one aspect. To delve deeper, it's crucial to know the meanings of various errors you might encounter as responses from the API. Below is another table for this purpose:

ErrorError MessageDescription
No API Key errorThe key parameter is not providedYou didn't include the API key in your request
Wrong API Key errorThe API key is not foundIncorrect API Key.
Bad request errorNot FoundThe requested resource couldn't be found on the RAWG API server.
Page errorInvalid pageWhen querying the page of a game, using an inappropriate integer value, such as a negative number or a string value.

๐Ÿ“˜

All errors are returned in JSON format