Interactive Transactions Broken as of 3.13
See original GitHub issueBug description
Interactive transactions stopped working for me upon updating to 3.13. This worked in 2.12
I’m getting the following error:
Error: Failed to convert napi `string` into rust type `String`
at Object.transaction (/usr/src/app/node_modules/@prisma/client/runtime/index.js:41312:64)
at async Proxy._transactionWithCallback (/usr/src/app/node_modules/@prisma/client/runtime/index.js:46414:21)
How to reproduce
Schema:
model Person {
id Int @id @default(autoincrement())
name String
}
Function:
router.post('/person', (req, res, next) => {
prisma.$transaction(async (prisma) => {
const person = await prisma.person.create({
data: {
name: 'A new role',
},
});
// Do something else
return person;
}).then(person => res.status(201).json(person))
.catch(next);
});
Expected behavior
No response
Prisma information
See in “How to reproduce” section.
Environment & setup
- OS: Ubuntu
- Database: SQL Server
- Node.js version: 17
Prisma Version
3.13
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Transactions and batch queries (Reference)
Interactive transactions : pass a function that can contain user code including Prisma Client queries, non-Prisma code and other control flow to be...
Read more >Chargeback Report: Rates, Statistics & Analysis
Midigator's annual chargeback report provides an overview of the dispute industry, complete with detailed statistics and analysis. Click here to learn more!
Read more >What's New In Python 3.12
Pending Removal in Python 3.13¶. The following modules and APIs have been deprecated in earlier Python releases, and will be removed in Python...
Read more >JEditor - Rich Text Editor for Jira - Version history
CollapsedExpanded3.13.10Jira Server 8.0.0 - 9.5.02022-12-12Bug fixes; ... CollapsedExpanded3.13.9Jira Data Center 8.0.0 - 9.4.12022-11-29Bug fix; ...
Read more >Chapter 17 - Supply Discrepancy Reporting
It controls routing of web submissions and logistics transactions ... customer service help lines (e.g. the DLA Customer Interaction Center, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am closing this issue now, it was fixed as part of the work with tracing in this PR https://github.com/prisma/prisma-engines/pull/2924
Either way, I won’t complain! 😄