Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attach record data to BATCH 412 responses. #122

Closed
n1k0 opened this issue Jul 6, 2015 · 4 comments · Fixed by mozilla-services/cliquet#369
Closed

Attach record data to BATCH 412 responses. #122

n1k0 opened this issue Jul 6, 2015 · 4 comments · Fixed by mozilla-services/cliquet#369

Comments

@n1k0
Copy link
Contributor

n1k0 commented Jul 6, 2015

In order for clients to properly notify from conflicting records on BATCH operations, it would be useful to have the record data attached to the JSON response body, eg.

{
  "errno": 999,
  "message": "Failed batch subrequest",
  "code": 412,
  "error": "Precondition Failed",
  "data": { "id": "" }
}

Also, it would be nice to have a dedicated errno and message for races.

@Natim
Copy link
Member

Natim commented Jul 6, 2015

I wonder if we shoudn't do the same for 409 Conflict

@n1k0
Copy link
Contributor Author

n1k0 commented Jul 6, 2015

Yes, probably.

@leplatrem
Copy link
Contributor

We already have a details field in error responses, so it makes sense to use it for 412.

AFAIK it is already present on 409, see http://cliquet.readthedocs.org/en/latest/api/errors.html#conflict-errors

Since this is something that concerns the protocol, it will be implemented in Cliquet.

@Natim
Copy link
Member

Natim commented Jul 7, 2015

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants