Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception handling #196

Open
creatingwake opened this issue Mar 29, 2021 · 3 comments
Open

Exception handling #196

creatingwake opened this issue Mar 29, 2021 · 3 comments

Comments

@creatingwake
Copy link

Current SDK does not handle exceptions well.

As a user of the SDK I expect the SDK to catch all exceptions related to events internal to the SDK and return me an appropriate status code in the event of an unrecoverable exception which results in failure.

Alternatively/additionally, as a user of the SDK I expect all unhandled exceptions raised by the SDK to be documented so I may catch them and implement appropriate handling.

Example:
Using the SMS API and calling send_message I experienced a traceback due to unhandled exceptions which occurred within the Vonage-python-sdk relating to connection errors with the Vonage API endpoint. Upon checking the documentation there is no list of possible exceptions the SDK may raise so it is not possible to determine which exceptions I need to catch to avoid suffering further failures. For simplicity, I expect the SDK to handle exceptions internally and pass me an appropriate status result.

@anthonyjdella
Copy link

+1

I have been experiencing the same thing. I'm seeing this with the Voice API and the input action for an NCCO. If the input action type is "speech" and the user does not say anything, nothing is raised.

@maxkahan
Copy link
Collaborator

maxkahan commented Jan 13, 2023

Hi @creatingwake I have added error handling for internal Vonage errors where a 200 is returned to the SDK, which is on the v4.x branch and will be released soon. I will close this issue when it goes live.

@maxkahan
Copy link
Collaborator

maxkahan commented Jan 13, 2023

@anthonyjdella Thanks for your input as well. The "speech" input type has a default timeout value of 10s in the startTimeout field, though this can be customised.

I will record this for investigation when I have time. If you're still having problems, feel free to open an issue or PR specific to this, or reach out to us on https://developer.vonage.com/community/slack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants