8000 Clarify response type and handling of errors in the README? · Issue #653 · stripe/stripe-python · GitHub
[go: up one dir, main page]

Skip to content

Clarify response type and handling of errors in the README? #653

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mrcoles opened this issue May 7, 2020 · 1 comment
Closed

Clarify response type and handling of errors in the README? #653

mrcoles opened this issue May 7, 2020 · 1 comment
Assignees

Comments

@mrcoles
Copy link
mrcoles commented May 7, 2020

It’d be helpful if the README had info on the response object type and handling error responses. It seems that trying it in a Python REPL is the best way, but it’s still unexpected that they’re both objects with attributes and dicts.

Response type:

If the response is a success, then the response is always an instance of stripe.stripe_object.StripeObject or the subclass stripe.api_resources.list_object.ListObject, which is a dict or list matching the response body, but it has a couple other bells and whistles, including the ability to access and set values via attributes (instead of dictionary item lookup). It’s possible I have a blind spot in the reading the docs, but I don’t see this explained in the Python API docs.

Error handling:

This one is covered really well in the sample code in the Python API docs “Handling Errors” section, but a little redundancy having it in the README (or just a clear deep-link to that section in the docs) would be nice.

I think this would help people feel more confident using the library. Regardless, thanks for providing this and keep up the great work with the client and API!

Loosely related issues:

@remi-stripe
Copy link
Contributor

@mrcoles Sorry for the delays here and thank you for providing detailed feedback! We definitely could improve the readme to make it clearer how to use stripe-python directly! We'll work on it next week :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0