Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 optional

See 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
```