• Sebastian Ziebell's avatar
    API: refined status code handling when adding or updating a project member · 818caf0b
    Sebastian Ziebell authored
    When a user is added to a project that is already a member of, a status code 201 is now returned to
    signal an idempotent operation. If something fails then instead of returning error code 404 different
    more specific error codes are returned. Status code 400 (Bad request) is returned when a required
    attribute, e.g. `access_level` is not given or 422 if there is a semantic error, e.g. should
    the `access_level` have an unsupported value.
    
    Specs are added to check these status codes.
    818caf0b
projects_spec.rb 13.5 KB