8000 More informative 'Authenticate' error message · Issue #42 · twilio/twilio-python · GitHub
[go: up one dir, main page]

Skip to content
More informative 'Authenticate' error message #42
Closed
@kevinburke

Description

@kevinburke

here's the current error message if someone provides incorrect accountsid/password combo:

Traceback (most recent call last):
  File "test_sms.py", line 8, in <module>
    body="Hello there!")
  File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/twilio/rest/resources.py", line 1022, in create
    return self.create_instance(params)
  File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/twilio/rest/resources.py", line 295, in create_instance
    resp, instance = self.request("POST", self.uri, data=body)
  File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/twilio/rest/resources.py", line 195, in request
    resp = make_twilio_request(method, uri, auth=self.auth, **kwargs)
  File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/twilio/rest/resources.py", line 168, in make_twilio_request
    raise TwilioRestException(resp.status_code, resp.url, message)
twilio.TwilioRestException: HTTP ERROR 401: 20003: Authenticate 
 https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXX/SMS/Messages.json

It would be great if we could provide some more context or a more informative message here.

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

      0