Skip to content

Commit

Permalink
Merge pull request #456 from empiricalthought/master
Browse files Browse the repository at this point in the history
Add log statements to except clauses
  • Loading branch information
thedrow committed Mar 31, 2017
2 parents 70dd283 + 66260fa commit 6115f22
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions oauthlib/oauth1/rfc5849/endpoints/signature_only.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,17 @@ def validate_request(self, uri, http_method='GET',
"""
try:
request = self._create_request(uri, http_method, body, headers)
except errors.OAuth1Error:
except errors.OAuth1Error as err:
log.info(
'Exception caught while validating request, %s.' % err)
return False, None

try:
self._check_transport_security(request)
self._check_mandatory_parameters(request)
except errors.OAuth1Error:
except errors.OAuth1Error as err:
log.info(
'Exception caught while validating request, %s.' % err)
return False, request

if not self.request_validator.validate_timestamp_and_nonce(
Expand Down

0 comments on commit 6115f22

Please sign in to comment.