thesportsdb-client

Exception

Table of Contents

Classes

ApiMessageException
The API answered with a message instead of data: an unrecognised {"Message": ...} body, or a rejected parameter, which v1 reports as text where the records belong: {"seasons": "Invalid League ID passed"}.
HttpStatusException
Any other non-2xx HTTP response, after retries for 5xx.
InvalidApiKeyException
The API rejected the key (HTTP 400 "Invalid Premium API key"). Only 123, 3 and paid keys work.
NetworkException
No HTTP response arrived (DNS, connection, timeout), after retries.
PremiumRequiredException
A v2 endpoint was called with a free key. v2 accepts premium keys only. Thrown before any request.
RateLimitException
HTTP 429 after the retry was used up or disabled.
ResponseParseException
The body was not a TheSportsDB envelope (e.g. an HTML error page).
SportsDbException
Base class for every exception this library throws. Messages never contain an API key: v1 URLs (which carry the key in their path) are shown with *** in its place.
On this page

Search results