Use message as returned by stripe

This commit is contained in:
PCoder 2019-12-31 22:55:53 +05:30
parent 6674e70ded
commit d4bfcbef47

View file

@ -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