leogomezz4t / PyTextNow_API

Python texting API utilizing TextNow API
MIT License
67 stars 41 forks source link

Exceptions on failed message delivery #19

Closed SilverStrings024 closed 3 years ago

SilverStrings024 commented 3 years ago

Hello, I love this package but I was wondering if there would be an exception raised if a message fails to be delivered or will it just raise a FailedRequestException? If there is no exception for a failed message, I'd be happy to try and write up a PR for it.

leogomezz4t commented 3 years ago

It would raise a FailedRequestException On Thu, Jun 17, 2021 at 10:27 AM SilverStrings (Matt) < @.***> wrote:

Hello, I love this package but I was wondering if there would be an exception raised if a message fails to be delivered or will it just raise a FailedRequestException?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/leogomezz4t/PyTextNow_API/issues/19, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQV6RXQY77Z3C4QCVOE3O53TTIO5VANCNFSM464ASU7Q .

leogomezz4t commented 3 years ago

@SilverStrings024 As far as I know, there is no way to see if the message fails to be delivered to the recipient. What you can do is see whether or not the request was sent to the textnow.com server.

SilverStrings024 commented 3 years ago

@SilverStrings024 As far as I know, there is no way to see if the message fails to be delivered to the recipient. What you can do is see whether or not the request was sent to the textnow.com server.

That's a good point. I'll do some testing and see if there is an indicator on the page that would tell us if it failed to send (such as a div element with a class name "message-error" or something like that). If so I'll write up a really fast script to look for said indicator after a FailedRequestException occurs and instead raise a FailedToSendException (or whatever name sounds better lol) so we can know if the failure to send was our fault, the fault of the server or if we had a bad number. Text now shouldn't notice to "robot" since it's only looking for the failure indication so it should be fine to look through the page after a failure to send to find more information about the issue.

leogomezz4t commented 3 years ago

Great sounds good thanks.

SilverStrings024 commented 3 years ago

Looking into it before full release of 2.0.0