closeio / closeio-api

Python API Client for Close
http://developer.close.com/
MIT License
65 stars 47 forks source link

Better access to validation errors #65

Closed thomasst closed 8 years ago

thomasst commented 8 years ago

ValidationError class. Should be backwards compatible.

For example, we can now check for errors like this: e.field_errors['field_name']

thomasst commented 8 years ago

@wojcikstefan I'm now also storing the response in any APIError. Is it okay to introduce a required argument to APIError?

wojcikstefan commented 8 years ago

I believe it's fine - don't think anybody in the wild relies on constructing and throwing their own closeio_api.APIErrors.