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

🐛 Bug Report: query with empty list throws error #5522

Closed
2 tasks done
joscha0 opened this issue May 11, 2023 · 3 comments · Fixed by utopia-php/database#264
Closed
2 tasks done

🐛 Bug Report: query with empty list throws error #5522

joscha0 opened this issue May 11, 2023 · 3 comments · Fixed by utopia-php/database#264
Assignees
Labels
bug Something isn't working product / databases Fixes and upgrades for the Appwrite Database.
Milestone

Comments

@joscha0
Copy link

joscha0 commented May 11, 2023

👟 Reproduction steps

await database.listDocuments(
  collectionId: "",
  databaseId: "",
  queries: [Query.equal(r'$id', ids)],
);

if ids is empty list []-> AppwriteException: general_unknown, Server Error (500)

👍 Expected behavior

return empty list

👎 Actual Behavior

throws error: AppwriteException: general_unknown, Server Error (500)

🎲 Appwrite version

Version 1.3.x

💻 Operating system

Linux

🧱 Your Environment

Appwrite Cloud

Flutter SDK appwrite: ^8.2.2

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@joscha0 joscha0 added the bug Something isn't working label May 11, 2023
@stnguyen90 stnguyen90 added the product / databases Fixes and upgrades for the Appwrite Database. label May 11, 2023
@stnguyen90 stnguyen90 self-assigned this May 11, 2023
@stnguyen90
Copy link
Contributor

@joscha0, thanks for creating this issue! 🙏 Let me check with the team on this.

@ArslanYM
Copy link

Would love to try this issue. Please assign me

@stnguyen90
Copy link
Contributor

We plan to throw 400 if an empty array is passed. This is actually already done and pending merge of utopia-php/database#264.

@ArslanYM, I suggest looking for issues labeled with "good first issue" if you're looking to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product / databases Fixes and upgrades for the Appwrite Database.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants