twilio-python: twilio.TwilioRestException - Docs bug, or import problem?

The docs say that TwilioRestException can be accessed from twilio.TwilioRestException, but this is not the case.

You instead need to use twilio.rest.exceptions.TwilioRestException.

Is this a documentation bug, or should twilio.TwilioRestException actually work?

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

In case anyone (like me) came here trying to figure out where to import from, it’s now from twilio.base.exceptions import TwilioRestException (as of 64fc4e01e8197acd521792e770baeeb99eebfa3b).