{"record":{"id":"22d476460868078f","repo":"hasura/graphql-engine","slug":"finding-status-w","errorCode":null,"errorMessage":"finding status: %w","messagePattern":"finding status: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/commands/migrate_squash.go","lineNumber":119,"sourceCode":"\nfunc (o *migrateSquashOptions) run() error {\n\tvar op errors.Op = \"commands.migrateSquashOptions.run\"\n\n\to.EC.Logger.Warnln(\n\t\t\"This command is currently experimental and hence in preview, correctness of squashed migration is not guaranteed!\",\n\t)\n\n\to.EC.Spin(fmt.Sprintf(\"Squashing migrations from %d to latest...\", o.from))\n\tdefer o.EC.Spinner.Stop()\n\n\tmigrateDrv, err := migrate.NewMigrate(o.EC, true, o.Source.Name, o.Source.Kind)\n\tif err != nil {\n\t\treturn errors.E(op, fmt.Errorf(\"unable to initialize migrations driver: %w\", err))\n\t}\n\n\tstatus, err := migrateDrv.GetStatus()\n\tif err != nil {\n\t\treturn errors.E(op, fmt.Errorf(\"finding status: %w\", err))\n\t}\n\n\tvar toMigration, fromMigration *migrate.MigrationStatus\n\n\tfromMigration, ok := status.Read(o.from)\n\tif !ok {\n\t\treturn errors.E(\n\t\t\top,\n\t\t\tfmt.Errorf(\n\t\t\t\t\"validating 'from' migration failed. Make sure migration with version %v exists\",\n\t\t\t\to.from,\n\t\t\t),\n\t\t)\n\t}\n\n\tif o.to == -1 {\n\t\ttoMigration = status.Migrations[status.Index[status.Index.Len()-1]]\n\t} else {","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/commands/migrate_squash.go#L101-L137","documentation":"Thrown by `hasura migrate squash` when GetStatus fails, i.e. the driver cannot read applied migrations from the server or present migrations from the project directory.","triggerScenarios":"Server API failure listing applied migrations, unreachable database from the server, or unreadable/corrupt local migrations directory.","commonSituations":"Network blips, expired credentials, manually edited migration files, migrations directory deleted mid-operation.","solutions":["Retry after confirming connectivity with `hasura migrate status`","Verify admin secret and endpoint","Ensure the migrations directory exists and is readable","Inspect server logs for the failing query"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"hasura migrate status --database-name <db>","typeGuard":null,"tryCatchPattern":"if err := migrateDrv.GetStatus(); err != nil { /* retry after backoff on network errors */ }","preventionTips":["Keep migration files parseable and committed","Check connectivity before squash operations"],"tags":["status","api","squash","hasura"],"backgroundTag":"migration-status-fetch-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}