nio-blocks / twilio

Send text messages and make voice calls using Twilio
1 stars 1 forks source link

Need better error handling #17

Open mattdodge opened 8 years ago

mattdodge commented 8 years ago

Right now it just logs Status 400

It would be nice to see all of the exception information

shadetree01010100 commented 6 years ago

I think a large part of the problem is these are older blocks that are handling exceptions that we would, today, prefer to simply raise. For example: https://github.com/nio-blocks/twilio/blob/master/tests/test_sms_block.py#L120

This unit test fails in Py3.6 because the TypeError message is different. Looking closer at the block code, it looks like removing the try/except blocks and simply raising exceptions would be helpful. In this example, we may want to assert that a TypeError has been raised, but can be indifferent to the exact message.