[openstreetmap/openstreetmap-website] APIChangesetNotSubscribedError has HTTP status code 404 (#1199)
notifications at github.com
Thu Apr 7 22:00:24 UTC 2016
**First off, I am not sure if this is a bug or intended behavior**:
In the changeset API, if a user tries to subscribe to a changeset he is already subscribed to, he gets a `APIChangesetAlreadySubscribedError` error. The other way round, if he is not subscribed and tries to unsubscribe, he gets a `APIChangesetNotSubscribedError `.
So far so good, but the HTTP status code for APIChangesetAlreadySubscribedError is a 409 - Conflict while the status code for APIChangesetNotSubscribedError is a 404 - Not Found. This seems to inconsistent.
404 Not Found is also returned if the changeset one wants to subscribe/unsubscribe to/from does not exist at all. This inconsistency makes it harder for clients to report to the user what is the exact problem.
So... is this a bug?
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rails-dev