Skip to content
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

wip: mark areas that need to change for better response and error handling #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jzaefferer
Copy link
Contributor

This isn't meant as a patch, more as a bug report or feature request. Tests fail, and should until its clear what really needs to change here.

The two issues I'd like to address:

  • A 204 response with an empty body should be okay, and not lead to a rejection
  • Handling response body in the error case needs be more flexible. In my case I'm expecting a single error property. I can imagine a callback for processing the error response, with the default handler implementing the current behaviour (looking for error.errors)

@masylum
Copy link
Owner

masylum commented Oct 17, 2017

Will check it out ASAP. The behaviours you are changing make sense.

@jzaefferer
Copy link
Contributor Author

After some improvements to my custom implementation, I've updated this to expose the response status code. Mostly to check for 401 errors and log out the user.

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

Successfully merging this pull request may close these issues.

2 participants