Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

When a client attempts to add a duplicate, I would return a 409 Conflict. A 400 bad request (with explanation error in response) would also be fine and is probably more common practice.

However, the jury is out on this one. REST doesn't make it clear what to do in these situations. See http://stackoverflow.com/questions/3290182/rest-http-status-codes-for-failed-validation-or-invalid-duplicatehttps://stackoverflow.com/questions/3290182/rest-http-status-codes-for-failed-validation-or-invalid-duplicate

When a client attempts to add a duplicate, I would return a 409 Conflict. A 400 bad request (with explanation error in response) would also be fine and is probably more common practice.

However, the jury is out on this one. REST doesn't make it clear what to do in these situations. See http://stackoverflow.com/questions/3290182/rest-http-status-codes-for-failed-validation-or-invalid-duplicate

When a client attempts to add a duplicate, I would return a 409 Conflict. A 400 bad request (with explanation error in response) would also be fine and is probably more common practice.

However, the jury is out on this one. REST doesn't make it clear what to do in these situations. See https://stackoverflow.com/questions/3290182/rest-http-status-codes-for-failed-validation-or-invalid-duplicate

Source Link
tom
  • 2k
  • 1
  • 15
  • 18

When a client attempts to add a duplicate, I would return a 409 Conflict. A 400 bad request (with explanation error in response) would also be fine and is probably more common practice.

However, the jury is out on this one. REST doesn't make it clear what to do in these situations. See http://stackoverflow.com/questions/3290182/rest-http-status-codes-for-failed-validation-or-invalid-duplicate