lobsite! Sign in Sign up

Edit didn't match patch.edit_failed

HTTP 409

What happened

An edit's old_text appears nowhere in the file, or in more than one place, so patch_files couldn't tell what to change. Nothing was deployed.

What to do

  • Read the file with read_file and copy old_text from it exactly, with the same spaces and line breaks.
  • If it matches more than one place, add more of the text around the change.
  • details.path and details.edit say which edit failed.

What it looks like

{ "error": { "code": "patch.edit_failed", "message": "…", "why": "…", "fix": "…",
  "docs_url": "https://lobsite.com/docs/errors/patch.edit_failed" } }