Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,14 @@
* the platform ACCEPTS and is expressly outside this ruling.
*
* The predicate already follows `error.cause` four levels deep, with its own
* pins (`schema-sync-errors.test.ts`, "follows an error wrapped as `cause`"),
* because "drivers commonly re-throw with the original attached as `cause`" is
* a case it was built for. So the wrap keeps the original there — and this
* suite pins the driver's half of that contract: the cause is present, it is
* the untouched dialect error, and it is NON-ENUMERABLE so it cannot ride back
* onto a wire through `JSON.stringify` or a spread.
* pins (`packages/types/src/driver-error-classification.test.ts` — #13279
* moved it there from `metadata/src/utils/schema-sync-errors.test.ts` —
* "follows an error wrapped as `cause`"), because "drivers commonly re-throw
* with the original attached as `cause`" is a case it was built for. So the
* wrap keeps the original there — and this suite pins the driver's half of
* that contract: the cause is present, it is the untouched dialect error, and
* it is NON-ENUMERABLE so it cannot ride back onto a wire through
* `JSON.stringify` or a spread.
*/

import { describe, it, expect, beforeAll, afterAll } from 'vitest';
Expand Down
10 changes: 6 additions & 4 deletions packages/drivers/driver-sql/src/sql-driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -813,10 +813,12 @@ function unresolvableFilterColumnError(object: string, column: string | null): E
* platform accepts — expressly outside this ruling.
*
* That predicate already follows `error.cause` up to four levels, with its own
* pins (`schema-sync-errors.test.ts`, "follows an error wrapped as `cause`"),
* because "drivers commonly re-throw with the original attached as `cause`" is
* a case it was built for. So the wrap is transparent to it and to every other
* cause-following consumer, and ⛔ the predicate itself is untouched.
* pins (`packages/types/src/driver-error-classification.test.ts` — #13279
* moved it there from `metadata/src/utils/schema-sync-errors.test.ts` —
* "follows an error wrapped as `cause`"), because "drivers commonly re-throw
* with the original attached as `cause`" is a case it was built for. So the
* wrap is transparent to it and to every other cause-following consumer, and
* ⛔ the predicate itself is untouched.
*
* The property is defined NON-ENUMERABLE, the same shape `new Error(msg, {
* cause })` produces. An enumerable `cause` would ride out through
Expand Down
6 changes: 4 additions & 2 deletions packages/services/service-analytics/src/analytics-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,10 @@ function isMissingColumnOfRelation(message: string): boolean {
* object "O"`, where the "relation" is inside "relationship" and the missing
* thing is a RELATIONSHIP, not a table. The anchor is the same pattern the
* sibling {@link missingSourceRelation} already uses for postgres (and the same
* shape as `metadata/src/utils/schema-sync-errors.ts`), so "is something
* missing" and "what is missing" can no longer disagree on this limb.
* shape as `packages/types/src/driver-error-classification.ts` — #13279
* moved it there from `metadata/src/utils/schema-sync-errors.ts`), so "is
* something missing" and "what is missing" can no longer disagree on this
* limb.
*
* MEASURED over the wordings this repo actually carries — 13 strings: the three
* driver families' phrasings (including sql-prefixed and schema-qualified
Expand Down
Loading