{"record":{"id":"9df6f9d84d780bf6","repo":"OpenBMB/ChatDev","slug":"2","errorCode":null,"errorMessage":"2","messagePattern":"2","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"check/check_workflow.py","lineNumber":155,"sourceCode":"                        help=\"Module name or .py path where edge functions are defined (for schema validation)\")\n    args = parser.parse_args()\n\n    data = read_yaml(args.path)\n\n    if not args.no_schema:\n        schema_errors = check_yaml.validate_design(data, set_defaults=True, fn_module_ref=args.fn_module)\n        if schema_errors:\n            print(\"Invalid schema:\")\n            for e in schema_errors:\n                print(f\"- {e}\")\n            raise SystemExit(1)\n\n    logic_errors = check_workflow_structure(data)\n    if logic_errors:\n        print(\"Workflow issues:\")\n        for e in logic_errors:\n            print(f\"- {e}\")\n        raise SystemExit(2)\n    else:\n        print(\"Workflow OK.\")\n\n\nif __name__ == \"__main__\":\n    main()\n","sourceCodeStart":137,"sourceCodeEnd":162,"githubUrl":"https://github.com/OpenBMB/ChatDev/blob/4fb2db0ea90375ce1059f44fe03ffbd191a7a169/check/check_workflow.py#L137-L162","documentation":"404 raised from the workflow-persist helper when allow_overwrite is true (the update path) but the target YAML file does not exist. Update is only valid for existing workflows.","triggerScenarios":"Calling the update API for a workflow filename that was never uploaded or has been deleted; updating after someone removed the file.","commonSituations":"Environments out of sync (dev file exists, prod doesn't); updating a renamed/deleted workflow; stale client state referencing old names.","solutions":["Upload (create) the workflow first via the upload API, then update.","Verify the exact filename with the list-workflows endpoint.","If the file was deleted unintentionally, restore it and retry the update."],"exampleFix":"# before\nupdate_workflow_content(\"missing.yaml\", content)  # 404\n# after\nupload_workflow_content(\"missing.yaml\", content)   # create first\nupdate_workflow_content(\"missing.yaml\", content2)    # then update","handlingStrategy":"validation","validationCode":"const exists = (await listWorkflows()).includes(filename);\nif (!exists) await uploadWorkflow(filename, content);","typeGuard":"async function canUpdate(name: string) { return (await listWorkflows()).includes(name); }","tryCatchPattern":"catch (e) { if (e.status === 404 && updating) await uploadWorkflow(filename, content); }","preventionTips":["Create-then-update ordering in scripts","Sync workflow sets across environments"],"tags":["workflow","not-found","yaml","fastapi"],"backgroundTag":"resource-not-found","analyzedSha":"4fb2db0ea90375ce1059f44fe03ffbd191a7a169","analyzedAt":"2026-08-27T14:35:29.622Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}