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
|
# Authentication with Stripe's API failed
|
||||||
# (maybe you changed API keys recently)
|
# (maybe you changed API keys recently)
|
||||||
logger.error(str(e))
|
logger.error(str(e))
|
||||||
response.update({'error': common_message})
|
response.update({'error': str(e)})
|
||||||
return response
|
return response
|
||||||
except stripe.error.APIConnectionError as e:
|
except stripe.error.APIConnectionError as e:
|
||||||
logger.error(str(e))
|
logger.error(str(e))
|
||||||
response.update({'error': common_message})
|
response.update({'error': str(e)})
|
||||||
return response
|
return response
|
||||||
except stripe.error.StripeError as e:
|
except stripe.error.StripeError as e:
|
||||||
# maybe send email
|
# maybe send email
|
||||||
logger.error(str(e))
|
logger.error(str(e))
|
||||||
response.update({'error': common_message})
|
response.update({'error': str(e)})
|
||||||
return response
|
return response
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# maybe send email
|
# maybe send email
|
||||||
logger.error(str(e))
|
logger.error(str(e))
|
||||||
response.update({'error': common_message})
|
response.update({'error': str(e)})
|
||||||
return response
|
return response
|
||||||
|
|
||||||
return handleProblems
|
return handleProblems
|
||||||
|
|
Loading…
Reference in a new issue