Content
You are here:
HTTP status 409 (Conflict) when attempting to update a work package via the API
Added by Keith Brautigam over 5 years ago
When attempting to update a work package via the API sometimes I get HTTP status 409 (Conflict). It seems like OpenProject is keeping around locks on work packages longer than it needs to. Anyway any ideas as to what causes this and what can be done about it would be appreciated.
Thank you!
Replies (2)
Hi Keith,
you will only get
409
errors if thelockVersion
in your update call is too old. It needs to match the current version of the work package in database (optimistic locking).If you POST to the form before trying to patch, you will get the error message for lockVersion as well as the current up-to-date lockVersion from the
_embedded.payload
data.Further references:
http://docs.openproject.org/apiv3-doc/#work-packages-work-package-patch
http://docs.openproject.org/apiv3-doc/#work-packages-work-package-edit-form-post
Best,
Oliver
Hi Oliver,
That gave me enough info to fix it. Thank you!
Keith