statsbombpy
statsbombpy copied to clipboard
Raise appropriate error when resource does not exist
When trying to retrieve a resource which does not exist, statsbombpy throws a JSONDecodeError. Example:
>> from statsbombpy import sb
>> sb.events(1234)
JSONDecodeError: Extra data: line 1 column 4 (char 3)
To help users understand what went wrong, it would be more appropriate to throw a ResourceNotFoundError (or something alike).