Make paypal failures visible as errors in Instana

This commit is contained in:
Michele Mancioppi
2019-09-09 13:28:36 +02:00
parent 7ef5c22ba3
commit 934f95deb0

View File

@@ -82,7 +82,7 @@ def pay(id):
app.logger.error(err)
return str(err), 500
if req.status_code != 200:
return 'payment error', req.status_code
return 'Payment error; \'{payment_gateway}\' answered with a status code \'{status_code}\''.format(payment_gateway=PAYMENT_GATEWAY, status_code=req.status_code), 503
# Generate order id
orderid = str(uuid.uuid4())