{"record":{"id":"05a67ba00556aa4e","repo":"hasura/graphql-engine","slug":"operation-failed-w-05a67b","errorCode":null,"errorMessage":"operation failed: %w","messagePattern":"operation failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/commands/migrate_delete.go","lineNumber":87,"sourceCode":"\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ec.AllDatabases && !opts.Force {\n\t\t\t\tconfirmation, err := util.GetYesNoPrompt(\n\t\t\t\t\t\"clear all mentioned migrations of all databases and it's history on the server?\",\n\t\t\t\t)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn errors.E(op, fmt.Errorf(\"error getting user input: %w\", err))\n\t\t\t\t}\n\n\t\t\t\tif !confirmation {\n\t\t\t\t\treturn nil\n\t\t\t\t}\n\t\t\t}\n\n\t\t\terr := opts.Run()\n\t\t\tif err != nil {\n\t\t\t\treturn errors.E(op, fmt.Errorf(\"operation failed: %w\", err))\n\t\t\t}\n\n\t\t\treturn nil\n\t\t},\n\t}\n\n\tf := migrateDeleteCmd.Flags()\n\tf.Uint64Var(&opts.Version, \"version\", 0, \"deletes the specified version in migrations\")\n\tf.BoolVar(&opts.All, \"all\", false, \"clears all migrations for selected database\")\n\tf.BoolVar(&opts.Force, \"force\", false, \"when set executes operation without any confirmation\")\n\tf.BoolVar(&opts.OnlyServer, \"server\", false, \"to reset migrations only on server\")\n\n\treturn migrateDeleteCmd\n}\n\ntype MigrateDeleteOptions struct {\n\tEC         *cli.ExecutionContext\n\tVersion    uint64","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/commands/migrate_delete.go#L69-L105","documentation":"Generic wrapper returned when the underlying MigrateDeleteOptions.Run() operation fails during `hasura migrate delete`. The real cause is in the wrapped error; this message only marks the failure boundary of the command body.","triggerScenarios":"Any failure inside Run(), e.g. metadata export failure when --all-databases is used, or per-source deletion errors propagated from RunOnSource.","commonSituations":"Server unreachable, invalid admin secret, missing migrations on disk, or permission errors while deleting migration files.","solutions":["Inspect the wrapped error message for the root cause","Check server URL/admin secret connectivity (hasura metadata export)","Verify the migrations directory exists and is writable","Re-run `hasura migrate status` to confirm versions exist"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// err is errors.E wrapped; inspect errors.Unwrap chain\nif err := opts.Run(); err != nil {\n  fmt.Fprintln(os.Stderr, err) // prints op + wrapped cause\n  os.Exit(1)\n}","preventionTips":["Read the wrapped cause, not just the outer message","Validate server connectivity before running destructive commands"],"tags":["cli","wrapper","hasura","migrations"],"backgroundTag":"wrapped-cli-operation-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}