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

🐞 fix: disable throws on empty ability checks #134

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

m1212e
Copy link
Member

@m1212e m1212e commented Oct 15, 2024

Describe your PR <3

@m1212e m1212e added the bug Something isn't working label Oct 15, 2024
@m1212e m1212e marked this pull request as draft October 15, 2024 20:28
branch: disable-errors-when-no-permission-is-present
branch: disable-errors-when-no-permission-is-present
… not found records

branch: disable-errors-when-no-permission-is-present
Copy link

🥷 Ninja i18n – 🛎️ Translations need to be updated

Project /project.inlang

lint rule new reports level link
Missing translation 1 warning contribute (via Fink 🐦)

@m1212e m1212e requested a review from Strehk October 15, 2024 21:01
@m1212e
Copy link
Member Author

m1212e commented Oct 15, 2024

This adjusts the permission check db where condition plugin in a way so it does not throw any errors but instead returns a condition which is never met resulting in no records being found. This allows for multi queries which should filter out and simply return empty lists without explicitly failing. Additionally we improved error reporting in case a prisma query fails when a records is not found because of this condition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant