fix(table-paste): surface first batch paste error

Closes #4832
This commit is contained in:
t8y2 committed 2026-08-23 16:24:19 +00:00
1 parent e1eb44f626
commit 72bb880ee7
6 files changed
+74 -10

No files matched your search

@@ -41,4 +41,10 @@ describe("cross-database table paste", () => {
expect(runtimeSource).toMatch(/buildDuplicateTableStructurePlan\(\{[\s\S]*?connectionId: entry\.connectionId[\s\S]*?sourceName: entry\.sourceName[\s\S]*?tableComment: entry\.tableComment/);
expect(runtimeSource).toContain("sourceColumns = plan.sourceColumns");
});
it("shows the first paste failure reason without concatenating every error", () => {
expect(runtimeSource).toMatch(/pasteFailCount\+\+/);
expect(runtimeSource).toMatch(/firstPasteError \?\?= e/);
expect(runtimeSource).toMatch(/batchPastePartialFail[\s\S]*?tableOperationFailed[\s\S]*?translateBackendError\(t, pasteFeedback\.firstError\)/);
});
});