added end on error logic to api calls

This commit is contained in:
freaker2112 2025-01-06 08:45:15 -06:00
parent 9feab06a65
commit 2538c7c8a1
Signed by: freaker2112
GPG Key ID: ECD635458A0082E8
1 changed files with 3 additions and 0 deletions

View File

@ -31,6 +31,7 @@ with tbaapiv3client.ApiClient(configuration) as api_client:
#print(api_response)
except ApiException as e:
print("Exception when calling EventApi->get_team_events_by_year_simple: %s\n" % e)
quit()
relevant_events = [event for event in api_response if event.event_type == 0]
@ -47,6 +48,7 @@ with tbaapiv3client.ApiClient(configuration) as api_client:
#pprint(event_api_response1)
except ApiException as e:
print("Exception when calling EventApi->get_event: %s\n" % e)
quit()
with tbaapiv3client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = tbaapiv3client.EventApi(api_client)
@ -55,6 +57,7 @@ with tbaapiv3client.ApiClient(configuration) as api_client:
#pprint(event_api_response2)
except ApiException as e:
print("Exception when calling EventApi->get_event: %s\n" % e)
quit()