Resolve "500 when adding user twice to group"
Closes #282 (closed)
We were responding with
500 and an error popup
when a request was approved for an action that had already been performed.
For example when approving the removal of a former member
that had already left the group on their own
we responded with a
This changes the response to
409 - conflict:
This response is sent when a request conflicts with the current state of the server.
I was also considering
404 - especially for requests
to remove a non-member.
404 for an update on a request
would seem more like the request itself could not be found.
This commit introduces the
It will be raised by requests whos action has already been performed.
It allows us to unify error handling on the controller level
and detect the different errors in each request class
and reraise them with a common more semantic error class.