Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'collectErrors' of null #6052

Closed
oceandrama opened this issue Mar 10, 2021 · 1 comment · Fixed by #6679
Closed

Cannot read property 'collectErrors' of null #6052

oceandrama opened this issue Mar 10, 2021 · 1 comment · Fixed by #6679
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. team/client Issue for team Client. tech/typescript Issue for tech TypeScript. topic: prisma-client
Milestone

Comments

@oceandrama
Copy link

oceandrama commented Mar 10, 2021

Bug description

There is a regression or a breaking change: if you pass null in findMany method, it falls with error Cannot read property 'collectErrors' of null

How to reproduce

Create any schema, for example with model User
Try to call next code

prisma.user.findMany({where: {AND: [null, {}]}})

Expected behavior

All users are returned like it was in 2.17.0, if this is a regression. Or correct error is shown, if this is a breaking change

Environment & setup

  • OS: Windows
  • Database: Postgres
  • Node.js version: 14.15.4
  • Prisma version: 2.18.0
@Jolg42 Jolg42 added bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. team/client Issue for team Client. tech/typescript Issue for tech TypeScript. topic: prisma-client process/candidate labels Mar 11, 2021
@pantharshit00
Copy link
Contributor

The error is reproducible but we disallow this in TS typings. We should define the behavior and fix the crash.

@pantharshit00 pantharshit00 added bug/2-confirmed Bug has been reproduced and confirmed. and removed bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. labels Mar 12, 2021
@timsuchanek timsuchanek added this to the 2.20.0 milestone Mar 17, 2021
@matthewmueller matthewmueller modified the milestones: 2.20.0, 2.21.0 Mar 31, 2021
@matthewmueller matthewmueller modified the milestones: 2.21.0, 2.22.0 Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. team/client Issue for team Client. tech/typescript Issue for tech TypeScript. topic: prisma-client
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants