Skip to main content
All exceptions are available under valaw.Exceptions. See the Exceptions reference for the full list.

Basic error handling

Wrap API calls in a try/except to handle errors gracefully:

Handling rate limits (429)

When you exceed the rate limit, a RiotAPIResponseError is raised with status code 429. Retry after a delay:

Handling not found (404)

Handling auth errors (401/403)

Handling validation errors

Validation errors are raised before making any network request:

Full example

Full details on response codes can be found in the Riot Games documentation.