Jordan-Prescott / odins_spear

Python library for Odin's API to build and manage Broadworks installations.
https://docs.jordan-prescott.com/odins_spear
MIT License
6 stars 0 forks source link

API Raises 400 if user license is nonexistent/wrong #55

Open 13ERT opened 2 weeks ago

13ERT commented 2 weeks ago

In functions like user_call_center() if the input UserID doesn't have an agent license the function will return with Http Error 400 instead of returning an empty Json value.

Current:

requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.api.com/api/v2/users/call-center?userId=userID@userID.com

Expected:

[]
13ERT commented 2 weeks ago

Noticing the same issue is happening for call centres:

out = magic.get.group_call_center_forced_forwarding(service_user_id=service_user_id)
print(out, type(out))

Return the same error code.

Possibly related to the fact its Call Forwarding Selective, instead of just generic forwarding.