@prisma/query-plan-executor 7.9.0-dev.2 → 7.9.0-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +36 -9
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -93472,7 +93472,7 @@ __export(index_exports, {
|
|
|
93472
93472
|
module.exports = __toCommonJS(index_exports);
|
|
93473
93473
|
|
|
93474
93474
|
// package.json
|
|
93475
|
-
var version = "7.9.0-dev.
|
|
93475
|
+
var version = "7.9.0-dev.3";
|
|
93476
93476
|
|
|
93477
93477
|
// ../../node_modules/.pnpm/temporal-polyfill@0.3.0/node_modules/temporal-polyfill/chunks/internal.js
|
|
93478
93478
|
function clampProp(e2, n2, t2, o2, r2) {
|
|
@@ -101876,20 +101876,47 @@ function rethrowAsUserFacing(error44) {
|
|
|
101876
101876
|
}
|
|
101877
101877
|
const code = getErrorCode(error44);
|
|
101878
101878
|
const message = renderErrorMessage(error44);
|
|
101879
|
-
if (
|
|
101880
|
-
throw error44;
|
|
101879
|
+
if (code !== void 0 && message !== void 0) {
|
|
101880
|
+
throw new UserFacingError(message, code, { driverAdapterError: error44 });
|
|
101881
|
+
}
|
|
101882
|
+
if (isGenericDatabaseErrorKind(error44.cause.kind)) {
|
|
101883
|
+
throw buildUnmappedDatabaseUserFacingError(error44);
|
|
101881
101884
|
}
|
|
101882
|
-
throw
|
|
101885
|
+
throw error44;
|
|
101883
101886
|
}
|
|
101884
101887
|
function rethrowAsUserFacingRawError(error44) {
|
|
101885
101888
|
if (!isDriverAdapterError(error44)) {
|
|
101886
101889
|
throw error44;
|
|
101887
101890
|
}
|
|
101888
|
-
throw
|
|
101889
|
-
|
|
101890
|
-
|
|
101891
|
-
|
|
101892
|
-
);
|
|
101891
|
+
throw buildRawQueryUserFacingError(error44);
|
|
101892
|
+
}
|
|
101893
|
+
function buildRawQueryUserFacingError(error44) {
|
|
101894
|
+
const code = error44.cause.originalCode ?? "N/A";
|
|
101895
|
+
const message = pickErrorMessage(error44);
|
|
101896
|
+
return new UserFacingError(`Raw query failed. Code: \`${code}\`. Message: \`${message}\``, "P2010", {
|
|
101897
|
+
driverAdapterError: error44
|
|
101898
|
+
});
|
|
101899
|
+
}
|
|
101900
|
+
function buildUnmappedDatabaseUserFacingError(error44) {
|
|
101901
|
+
const code = error44.cause.originalCode ?? "N/A";
|
|
101902
|
+
const message = pickErrorMessage(error44);
|
|
101903
|
+
return new UserFacingError(`Database error. Code: \`${code}\`. Message: \`${message}\``, "P2039", {
|
|
101904
|
+
driverAdapterError: error44
|
|
101905
|
+
});
|
|
101906
|
+
}
|
|
101907
|
+
function pickErrorMessage(error44) {
|
|
101908
|
+
return error44.cause.originalMessage ?? renderErrorMessage(error44) ?? error44.message ?? "N/A";
|
|
101909
|
+
}
|
|
101910
|
+
function isGenericDatabaseErrorKind(kind) {
|
|
101911
|
+
switch (kind) {
|
|
101912
|
+
case "postgres":
|
|
101913
|
+
case "mysql":
|
|
101914
|
+
case "sqlite":
|
|
101915
|
+
case "mssql":
|
|
101916
|
+
return true;
|
|
101917
|
+
default:
|
|
101918
|
+
return false;
|
|
101919
|
+
}
|
|
101893
101920
|
}
|
|
101894
101921
|
function getErrorCode(err) {
|
|
101895
101922
|
switch (err.cause.kind) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/query-plan-executor",
|
|
3
|
-
"version": "7.9.0-dev.
|
|
3
|
+
"version": "7.9.0-dev.3",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"hono": "4.11.7",
|
|
20
20
|
"temporal-polyfill": "0.3.0",
|
|
21
21
|
"zod": "4.1.3",
|
|
22
|
-
"@prisma/adapter-pg": "7.9.0-dev.
|
|
23
|
-
"@prisma/adapter-
|
|
24
|
-
"@prisma/
|
|
25
|
-
"@prisma/
|
|
26
|
-
"@prisma/adapter-
|
|
22
|
+
"@prisma/adapter-pg": "7.9.0-dev.3",
|
|
23
|
+
"@prisma/adapter-mariadb": "7.9.0-dev.3",
|
|
24
|
+
"@prisma/adapter-mssql": "7.9.0-dev.3",
|
|
25
|
+
"@prisma/client-engine-runtime": "7.9.0-dev.3",
|
|
26
|
+
"@prisma/driver-adapter-utils": "7.9.0-dev.3"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
"dist"
|