Comments (3)
Result objects have a deep_errors
attribute that returns a flattened list of all errors at all levels. You can simply grab the code of the first error, or grab all of the codes, and take programmatic action based on the codes you see.
Take a look at http://www.braintreepaymentsolutions.com/docs/python/general/validation_errors#all_errors_on_all_levels
Please let us know if deep_errors
does not accomplish what you are looking for.
from braintree_python.
Right, I'm aware of deep_errors
and can get by with it. This issue is really more of a feature request than a bug. The top-level message
would be more generally useful if it had a matching code
attribute, to bring it into parity with all the other error objects in an ErrorResult
. Failing that, it would be nice at least to have documentation indicating which of the errors in deep_errors
is represented by the top level message
.
from braintree_python.
The top level message is a string containing all of the error messages (validation errors, processor declined, etc). Since there can be more than one error, there is no one code that matches. We will update the docs to make this more clear.
from braintree_python.
Related Issues (20)
- gateway.transaction.find raises a TypeError when initialised with client_id and secret HOT 2
- Respect the requests_ca_bundle environment variable HOT 2
- Transaction using nonce fails but payment method gets vaulted with option "store_in_vault_on_success" HOT 1
- Is this library thread-safe? HOT 3
- Connection pooling HOT 3
- Module fails on import HOT 1
- TypeError: can only concatenate str (not "NoneType") to str HOT 1
- Braintree created subscription not showing in sandox account HOT 3
- Print transactions in JSON format HOT 4
- Headers provided by braintree http util contain mixture of str/bytes HOT 2
- Remove universal wheel, python 2 is unsupported HOT 2
- Use python_requires='>=3.5' HOT 2
- Paypal credit
- strings with special regex characters are causing a DeprecationWarning HOT 3
- Include updated_at field in TransactionSearch HOT 2
- Go SDK + CloudQuery source plugin? HOT 1
- Can't upgrade to Braintree 4.18.1 / Python 3.10.9 (DeprecationWarning: Use ProtectionLevel enum instead) HOT 11
- braintree python sdk support initWithAuthorization/initWIthAPIClient like iOS SDK and receive client token as argues? HOT 1
- Unittest failures on Python 3.12 HOT 1
- Expose error details in "UnexpectedException" in Python library HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from braintree_python.