Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/almeidx/prisma-wrong-method-in-error-in-transaction
https://github.com/almeidx/prisma-wrong-method-in-error-in-transaction
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/almeidx/prisma-wrong-method-in-error-in-transaction
- Owner: almeidx
- Created: 2023-08-22T22:36:08.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-08-22T23:08:17.000Z (over 1 year ago)
- Last Synced: 2024-10-13T02:44:41.773Z (2 months ago)
- Language: TypeScript
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# How to run
1. `pnpm install`
1. `pnpm build`
1. `pnpm start`## Result
![result](./result.png)
Logs with all the log types enabled are available [here](./logs.txt).
## Notes
Interestingly, removing the empty object from the first method call causes a different error,
likely at the error logging stage, given that the `deleteMany()` parameter is optionalSee logs
```
prisma:info Starting a sqlite pool with 17 connections.
prisma:query BEGIN
prisma:query ROLLBACK
prisma:error Cannot convert undefined or null to object
prisma:error
Invalid `prisma.model2.create()` invocation:{
data: {
field2: "value",
faultyField: "value"
~~~~~~~~~~~
}
}Unknown argument `faultyField`. Available options are listed in green.
prisma:error
Invalid `prisma.model1.create()` invocation:{
data: {
field: "value",
? field2?: String
}
}Unknown argument `faultyField`. Available options are listed in green.
C:\[REDACTED]\prisma-wrong-method-in-error-in-transaction\node_modules\.pnpm\@[email protected][email protected]\node_modules\@prisma\client\runtime\library.js:28
[REDACTED]TypeError: Cannot convert undefined or null to object
```