diff options
| author | Tom Christie | 2013-06-10 09:06:15 +0100 |
|---|---|---|
| committer | Tom Christie | 2013-06-10 09:06:15 +0100 |
| commit | 351e172d4568e39df9760f989eb976c726e604ce (patch) | |
| tree | f9b605effe6b71aedb0d687062f00a46373bde6c /rest_framework/authentication.py | |
| parent | 777ecb5141d5d4f1a6b4e10e376965148022822c (diff) | |
| parent | 5ce1d6c86bb0831916ba4137560d84295ac7ec95 (diff) | |
| download | django-rest-framework-351e172d4568e39df9760f989eb976c726e604ce.tar.bz2 | |
Merge branch 'master' of https://github.com/tomchristie/django-rest-framework
Diffstat (limited to 'rest_framework/authentication.py')
| -rw-r--r-- | rest_framework/authentication.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rest_framework/authentication.py b/rest_framework/authentication.py index 9caca788..f659a172 100644 --- a/rest_framework/authentication.py +++ b/rest_framework/authentication.py @@ -230,8 +230,9 @@ class OAuthAuthentication(BaseAuthentication): try: consumer_key = oauth_request.get_parameter('oauth_consumer_key') consumer = oauth_provider_store.get_consumer(request, oauth_request, consumer_key) - except oauth_provider.store.InvalidConsumerError as err: - raise exceptions.AuthenticationFailed(err) + except oauth_provider.store.InvalidConsumerError: + msg = 'Invalid consumer token: %s' % oauth_request.get_parameter('oauth_consumer_key') + raise exceptions.AuthenticationFailed(msg) if consumer.status != oauth_provider.consts.ACCEPTED: msg = 'Invalid consumer key status: %s' % consumer.get_status_display() |
