Skip to content

Resolve "500 when adding user twice to group"

azul requested to merge 282-fix-500-on-double-join into master

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 500.

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. However a 404 for an update on a request would seem more like the request itself could not be found.

This commit introduces the Request::PointlessAction exception. 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.

Merge request reports

Loading