Skip to content

Ability to get the SmsError status without parsing the error message #325

@QuentinFchx

Description

@QuentinFchx

Is your feature request related to a problem? Please describe.
I'm currently trying to migrate from v3 to v4.
When sending a SMS, I have some specific error handling code when SMS are throttled.
If I'm not mistaken, the new implementation raises a SmsError when an error is detected, but does not expose the status explicitly (on which I would like to match/case)
Source https://github.com/Vonage/vonage-python-sdk/blob/a8dbf81c818093e91c2ce8619c99ad5de9b6976a/sms/src/vonage_sms/sms.py#L89C19-L89C27

Describe the solution you'd like
Would it be possible to expose the status returned by the API in the SmsError class? (along with the error-text while we're at it)

Describe alternatives you've considered
Parsing the error message, but it's brittle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions