Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

findOne: Stop throwing an error when no record found #245

Closed
schickling opened this issue Oct 4, 2019 · 6 comments
Closed

findOne: Stop throwing an error when no record found #245

schickling opened this issue Oct 4, 2019 · 6 comments
Assignees
Labels
kind/improvement An improvement to existing feature and code.
Milestone

Comments

@schickling
Copy link
Member

Even though we're currently working on some bigger API changes which will fix this behavior, it will take a little while until all these changes will be implemented and ship. In the meanwhile I'd like to address one of the most frequent points of feedback by Prisma 2 testers which is to stop throwing an error when no record was found when using the findOne operation. (See #89)

@timsuchanek would be great if you could address this during the current sprint 🙏

@janpio janpio added process/candidate Candidate for next Milestone. kind/improvement An improvement to existing feature and code. labels Oct 7, 2019
@janpio janpio added this to the Preview 15 milestone Oct 11, 2019
@janpio janpio removed the process/candidate Candidate for next Milestone. label Oct 11, 2019
@danlannz
Copy link

@timsuchanek @schickling was this reverted in Preview 16? I'm getting the following error in my seed script but Preview 15 works as expected

  106 for (const [modelName, models] of Object.entries(data)) {
  107   for (const entity of models) {
  108     const existingEntity = await (photon as any)[modelName]
→ 109       .findOne(

Reason: Error occurred during query execution:
ConnectorError(RecordDoesNotExist)

@yovanoc
Copy link

yovanoc commented Nov 11, 2019

Yes same for me, regression I supposed :/

@pantharshit00 pantharshit00 reopened this Nov 11, 2019
@pantharshit00
Copy link
Contributor

I can confirm this regression.

@pantharshit00 pantharshit00 removed the kind/improvement An improvement to existing feature and code. label Nov 11, 2019
@pantharshit00
Copy link
Contributor

image

@janpio janpio modified the milestones: Preview 15, Preview 17 Nov 11, 2019
@janpio janpio added kind/regression A reported bug in functionality that used to work before. bug/2-confirmed We have confirmed that this is a bug. labels Nov 11, 2019
@pantharshit00 pantharshit00 added kind/improvement An improvement to existing feature and code. and removed bug/2-confirmed We have confirmed that this is a bug. kind/regression A reported bug in functionality that used to work before. labels Nov 11, 2019
@pantharshit00 pantharshit00 removed this from the Preview 17 milestone Nov 11, 2019
@pantharshit00
Copy link
Contributor

Closing in favour of prisma/prisma#914 which we are using to track the regression in our milestone

@tvvignesh
Copy link

Still facing similar issue. Added details here: prisma/prisma#914 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/improvement An improvement to existing feature and code.
Projects
None yet
Development

No branches or pull requests

8 participants