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 API errors on RSVPing should return friendlier error messages #921

jamietanna opened this issue Feb 17, 2020 · 1 comment


Copy link

As per Ryan's comment on chat we should return the human-readable error in the payload to the user

Copy link

snarfed commented Apr 26, 2020

specifically, here are the example error messages i hit, from 2020-02-17 #indieweb-dev:

  • when i try to rsvp to a group's event that i'm not a member of: Error: {"errors":[{"code":"member_error","message":"Invalid member"}]} HTTP Error 400: Bad Request
  • when i rsvp to a nonexistent url (that passes the regex): Error: {"errors":[{"code":"group_error","message":"Invalid group urlname xyz"}]} HTTP Error 404: Not Found

the catch is that these are urllib.error.HTTPErrors that propagate all the way up to, where they're caught and returned as user-visible error messages:

msg = 'Error: %s %s' % (body or '', e)

the catch is, we want to parse the response body as JSON there and pull out the message field(s) and only show them, but that's specific to the meetup API. so maybe we'd do it here, in granary:

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

No branches or pull requests

2 participants