I had duplicate primary-key in the nested creates & this was throwing error. Would be helpful to have actual error message. Thanks!
Error: duplicate key value violates unique constraint "product_variants_pkey"
(37.2ms) ROLLBACK
[07:02:06] ERROR: OpenAPI error
err: {
"type": "",
"message": "savepoint \"undefined\" does not exist: ",
"stack":
error: savepoint "undefined" does not exist
at then (/Users/krishna404/codeProjects/teziapp/tezi-new-orpc/node_modules/pqb/src/query/then/then.ts:798:17)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
caused by: Error
at Module.<anonymous> (/Users/krishna404/codeProjects/teziapp/tezi-new-orpc/node_modules/pqb/src/query/query-methods.ts:1036:1)
at Module._compile (node:internal/modules/cjs/loader:1730:14)
at Object.transformer (/Users/krishna404/codeProjects/teziapp/tezi-new-orpc/node_modules/tsx/dist/register-D46fvsV_.cjs:3:1104)
at Module.load (node:internal/modules/cjs/loader:1465:32)
at Function._load (node:internal/modules/cjs/loader:1282:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
at Module.<anonymous> (node:internal/modules/cjs/loader:1487:12)
"length": 99,
"name": "error",
"severity": "ERROR",
"code": "3B001",
"file": "xact.c",
"line": "4595",
"routine": "RollbackToSavepoint"
}
I had duplicate primary-key in the nested creates & this was throwing error. Would be helpful to have actual error message. Thanks!