diff --git a/lib/DboBuilder/TableHandler/runInsertUpdateQuery.ts b/lib/DboBuilder/TableHandler/runInsertUpdateQuery.ts index 4a38f6dc..5ec41617 100644 --- a/lib/DboBuilder/TableHandler/runInsertUpdateQuery.ts +++ b/lib/DboBuilder/TableHandler/runInsertUpdateQuery.ts @@ -1,7 +1,6 @@ import { AnyObject, asName, FieldFilter, InsertParams, UpdateParams } from "prostgles-types"; import { LocalParams, makeErrorFromPGError, withUserRLS } from "../../DboBuilder"; import { InsertRule, UpdateRule } from "../../PublishParser"; -import { getCondition } from "../getCondition"; import { getSelectItemQuery, TableHandler } from "./TableHandler"; type RunInsertUpdateQueryArgs = { @@ -93,7 +92,7 @@ export const runInsertUpdateQuery = async ({ tableHandler, queryWithoutUserRLS, } if(checkFilter && result.failed_check?.length){ - throw `The following rows did not pass the checkFilter condition: ${JSON.stringify(result.failed_check)}`; + throw { message: `New data failed the check condition`, failed: result.failed_check }; } const finalDBtx = tableHandler.getFinalDBtx(localParams); diff --git a/package-lock.json b/package-lock.json index 4b3cbb55..2ca4db9f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "prostgles-server", - "version": "4.1.95", + "version": "4.1.96", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "prostgles-server", - "version": "4.1.95", + "version": "4.1.96", "license": "MIT", "dependencies": { "@types/express": "^4.17.13", diff --git a/package.json b/package.json index a7b32d9a..bc82ac55 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "prostgles-server", - "version": "4.1.95", + "version": "4.1.96", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/tests/client/PID.txt b/tests/client/PID.txt index af5428b4..74aa2ed4 100644 --- a/tests/client/PID.txt +++ b/tests/client/PID.txt @@ -1 +1 @@ -115104 +124144 diff --git a/tests/server/package-lock.json b/tests/server/package-lock.json index e02168ec..1731380c 100644 --- a/tests/server/package-lock.json +++ b/tests/server/package-lock.json @@ -21,7 +21,7 @@ }, "../..": { "name": "prostgles-server", - "version": "4.1.95", + "version": "4.1.96", "license": "MIT", "dependencies": { "@types/express": "^4.17.13",