Use message as returned by stripe
This commit is contained in:
parent
6674e70ded
commit
d4bfcbef47
1 changed files with 4 additions and 4 deletions
|
@ -43,21 +43,21 @@ def handleStripeError(f):
|
|||
# Authentication with Stripe's API failed
|
||||
# (maybe you changed API keys recently)
|
||||
logger.error(str(e))
|
||||
response.update({'error': common_message})
|
||||
response.update({'error': str(e)})
|
||||
return response
|
||||
except stripe.error.APIConnectionError as e:
|
||||
logger.error(str(e))
|
||||
response.update({'error': common_message})
|
||||
response.update({'error': str(e)})
|
||||
return response
|
||||
except stripe.error.StripeError as e:
|
||||
# maybe send email
|
||||
logger.error(str(e))
|
||||
response.update({'error': common_message})
|
||||
response.update({'error': str(e)})
|
||||
return response
|
||||
except Exception as e:
|
||||
# maybe send email
|
||||
logger.error(str(e))
|
||||
response.update({'error': common_message})
|
||||
response.update({'error': str(e)})
|
||||
return response
|
||||
|
||||
return handleProblems
|
||||
|
|
Loading…
Reference in a new issue