Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-4435

Consider the use of 409 return code as (partial or full) replacement of 422

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Received (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 7.0
    • Fix Version/s: None
    • Component/s: REST API v7
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      1
    • Documentation Status:
      Needed

      Description

      In https://github.com/DSpace/DSpace/pull/2668 it was noted by Chris Wilper than the return code 409 Conflict could be more appropriate in situation where we currently use 422

      Andrea Bollini (4Science)

      422 is appropriate when there is a semantic issue with the request. For instance a valid patch to withdrawn an item, if the item is a workspace should return 422

      Chris Wilper

      That particular case seems more like a 409 conflict – the request can't be honored due to the state of the target resource. As a data point, I see that aws s3 rest api uses 400 and 409 quite a lot to indicate various interesting "semantic" request issues...but not 422. https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html

      This issue is to keep the conversation on going and agree about which, if any, endpoint should be revisited to use the 409 return code

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            bollini Andrea Bollini (4Science)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated: