windmill-labs/windmill · error

[SQL Migration] Could not refresh docs: ${regenError.message

Error message

[SQL Migration] Could not refresh docs: ${regenError.message}

What it means

Non-fatal degradation in `wmill app dev`'s SQL-migration flow: after a migration file was applied and marked completed, the follow-up regenerateAgentDocs call (refreshing AGENTS.md and DATATABLES.md to reflect schema changes) threw. The migration itself succeeded; only the documentation refresh was skipped.

Source

Thrown at cli/src/commands/app/dev.ts:1371

                  result,
                }),
              );

              // Delete the SQL file and process next in queue
              if (currentSqlFile) {
                await onSqlFileCompleted(currentSqlFile, true);
              }

              // Regenerate AGENTS.md and DATATABLES.md to reflect schema changes
              try {
                await regenerateAgentDocs(workspaceId, process.cwd(), true);
                log.info(
                  colors.gray(
                    `[SQL Migration] Refreshed AGENTS.md and DATATABLES.md`,
                  ),
                );
              } catch (regenError: any) {
                log.warn(
                  colors.yellow(
                    `[SQL Migration] Could not refresh docs: ${regenError.message}`,
                  ),
                );
              }
            } catch (error: any) {
              log.error(
                colors.red(`[SQL Migration] Error: ${error.message}`),
              );
              ws.send(
                JSON.stringify({
                  type: "sqlMigrationResult",
                  error: true,
                  message: error.message || String(error),
                }),
              );
              // Don't delete file on error, but clear current so user can retry
              currentSqlFile = null;

View on GitHub (pinned to e474e8803c)

Solutions

  1. Re-run the docs regeneration once the cause (API error, permissions, disk) is resolved — the SQL file was already consumed
  2. Regenerate AGENTS.md/DATATABLES.md manually with the same regeneration command
  3. Check the wrapped regenError message for the underlying cause (usually workspace API access)
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at cli/src/commands/app/dev.ts:1371 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/f13e026aa802725c. Report an issue: GitHub.