https://retellai.com/?utm_source=discord&utm_medium=seo logo
Issue: retell-sdk not raising APIStatusError for n...
# ❓・ai-evy-support
i
Issue: retell-sdk not raising APIStatusError for non-200 responses Sample code (minimal):
Copy code
import retell
from retell import Retell

client = Retell()

try:
  client.agent.create(
    response_engine={"llm_id": "llm_234sdertfsdsfsdf", "type": "retell-llm"},
    voice_id="11labs-Adrian",
  )
except retell.APIConnectionError as e:
  print("Connection error")
except retell.RateLimitError as e:
  print("429 rate limit")
except retell.APIStatusError as e:
  print("NON-200", e.status_code, e.response)
Expected: non-200 responses should be caught by
except retell.APIStatusError
Observed: APIStatusError handler is not entered, but a statement is logged saying 400 bad request. Docs: https://pypi.org/project/retell-sdk/ I'm using latest SDK version (per PyPI) @User Can anyone please help with with this? Our users are affected with this issue.