Exceptions¶
The following exceptions are thrown by the library.
-
exception
coc.ClashOfClansException¶ Base exception for coc.py
-
exception
coc.HTTPException(response=None, data=None)¶ Base exception for when a HTTP request fails
-
response¶ aiohttp.ClientResponse- The response of the failed HTTP request.
-
-
exception
coc.InvalidArgument¶ Thrown when an error status 400 occurs.
Client provided incorrect parameters for the request.
Subclass of
HTTPException
-
exception
coc.InvalidCredentials(response=None, data=None)¶ Thrown when an error status 403 occurs and the reason is invalid credentials.
Special Exception thrown when missing/incorrect credentials were passed. This is when your email/password pair is incorrect. Subclass of
HTTPException
-
exception
coc.Forbidden(response=None, data=None)¶ Thrown when an error status 403 occurs.
API token does not grant access to the requested resource.
Subclass of
HTTPException
-
exception
coc.NotFound(response=None, data=None)¶ Thrown when an error status 404 occurs.
The resource was not found.
Subclass of
HTTPException
-
exception
coc.Maintenance(response=None, data=None)¶ Thrown when an error status 503 occurs.
Service is temporarily unavailable because of maintenance.
Subclass of
HTTPException
-
exception
coc.GatewayError(response=None, data=None)¶ Thrown when a gateway error occurs. These are either status 502 or 504
Error code 502: Bad Gateway Error code 504: The Gateway has timed-out.
Subclass of
HTTPException