Skip to content

Commit

Permalink
raise value error if bot manager url is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
lakhoune committed Feb 26, 2024
1 parent 034079e commit 31daf00
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions utils/api_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ def fetch_bot_model(name, endpoint="https://mobsos.tech4comp.dbis.rwth-aachen.de

def fetch_event_log(bot_name, url=None, botManagerUrl=None):
if url is None:
url = f"https://mobsos.tech4comp.dbis.rwth-aachen.de/event-log"
print("No url provided, using default url")
raise ValueError("event log url must be set")
if botManagerUrl is None:
botManagerUrl = f"https://mobsos.tech4comp.dbis.rwth-aachen.de/SBFManager"
print("No bot manager url provided, using default url")
raise ValueError("botManagerUrl must be set")
resource_ids = get_resource_ids_from_bot_manager(botManagerUrl, bot_name)
response = r.post(f"{url}/resources", json={"resource_ids": resource_ids})
# response is xml, use pm4py to parse it
Expand Down

0 comments on commit 31daf00

Please sign in to comment.