Comment 3 for bug 637323

Revision history for this message
Leonard Richardson (leonardr) wrote : Re: Spurious 412 error from the API on PATCH

James, what objects are you manipulating through the web service? I bet it's bugs. Ursula says she's manipulating bugs. This is the same behavior we were seeing with bug 336866, and bugs are the most complicated objects published through the web service.

Does the first PATCH you ever send fail with a 412, or are you doing more than one PATCH?

Bug 336886 had a number of causes, but they all had to do with code that triggered side effects. You'd make a change to field 'foo', and as a side effect field 'bar' would be changed. But lazr.restful wouldn't hear about the change to 'bar', and when it sent you the 209 response code with the "new" representation it would include the change to "foo" but not to "bar". I'm not sure exactly what you mean when you say the objects are the same, and this is a bug that can be triggered by different HTTP headers even if the JSON documents are the same.

If this behavior is only happening on edge, it's probably caused by a branch that landed recently.

If lp_save() is sometimes succeeding and sometimes failing, I would like to see the actual headers and content of the 209 response code you get when it succeeds.