Braintree gateway ServerError not handled properly #81121

Open
opened 2020-09-24 10:52:05 +02:00 by Sybren A. Stüvel · 2 comments

When Braintree goes down, for example for maintenance, their SDK will raise a ServerError from /var/www/blender-fund/.venv/lib/python3.6/site-packages/braintree/util/http.py in raise_exception_from_status, line 49. This function is called indirectly by the call self.braintree.client_token.generate(params) from looper/gateways.py, function generate_client_token.

The exception is not caught properly, resulting in an internal server error. Probably it's best to catch this exception at a higher level than that particular call, and present a generic error message to the user.

When Braintree goes down, for example for maintenance, their SDK will raise a `ServerError` from `/var/www/blender-fund/.venv/lib/python3.6/site-packages/braintree/util/http.py` in `raise_exception_from_status`, line 49. This function is called indirectly by the call `self.braintree.client_token.generate(params)` from `looper/gateways.py`, function `generate_client_token`. The exception is not caught properly, resulting in an internal server error. Probably it's best to catch this exception at a higher level than that particular call, and present a generic error message to the user.
Author
Owner

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Author
Owner

Added subscribers: @dr.sybren, @fsiddi, @railla

Added subscribers: @dr.sybren, @fsiddi, @railla
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: infrastructure/devfund-website#81121
No description provided.