coc.py
coc.py copied to clipboard
Error when accessing current war data for clans that haven't participated in wars (for a longer time)
I'm experiencing an issue where methods like get_current_war
and get_clan_war
fail if the clan hasn't participated in any wars, even when the war log is set to public. This results in an error when trying to retrieve war data for such clans.
For example, using a valid clan tag like #2PPP
that hasn't fought any wars yet leads to an error when calling these methods. It would be great if there could be better handling for such cases, perhaps returning a message like "Not found" or similar when the clan doesn't have any war data.
Current Behavior:
The get_current_war
and get_clan_war
methods throw an error when the clan hasn't participated in any wars.
Steps to Reproduce:
- Use a clan tag of a clan that hasn't participated in any wars (e.g., #2PPP).
- Call get_current_war or get_clan_war.
- The request fails with an error.