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: seach query throws server error 500 on Cloud #5729

Closed
2 tasks done
subhamX opened this issue Jun 19, 2023 · 6 comments
Closed
2 tasks done

🐛 Bug Report: seach query throws server error 500 on Cloud #5729

subhamX opened this issue Jun 19, 2023 · 6 comments
Assignees
Labels
bug Something isn't working product / cloud Issues found only on Appwrite Cloud product / databases Fixes and upgrades for the Appwrite Database.

Comments

@subhamX
Copy link

subhamX commented Jun 19, 2023

👟 Reproduction steps

Run the following query:

const projectIds=[]
const projects = (new Databases(appwriteClient)).listDocuments(
  appwriteDatabaseId,
  appwriteProjectsCollectionId,
  [Query.equal("$id", projectIds)]
);

👍 Expected behavior

The following should return an empty projects arr.

👎 Actual Behavior

It throws server error

🎲 Appwrite version

Appwrite Cloud

💻 Operating system

Linux

🧱 Your Environment

Using [email protected].

👀 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?

@subhamX subhamX added the bug Something isn't working label Jun 19, 2023
@joeyouss
Copy link

Hi, Yes we are aware of this problem and this is in plans to get fixed.

@joeyouss joeyouss self-assigned this Jun 20, 2023
@joeyouss joeyouss added the product / databases Fixes and upgrades for the Appwrite Database. label Jun 20, 2023
@subhamX
Copy link
Author

subhamX commented Jun 20, 2023

Ah. That's great. Was doing some digging on the queries and filters in the codebase to find the source of the problem, but if it's already on the board I guess I can park my exploration.

I wonder where are we making the actual DB calls? My idea was to not make any DB calls, and just return an empty array. I was tracing from Request, but couldn't reach anywhere. (Maybe I haven't yet spent enough time on it).

Request:getParams -> Filters:parse -> Filters:parseDocumentList -> ???

Anyways, thank you for taking care of it.

@joeyouss
Copy link

joeyouss commented Jun 20, 2023

@subhamX You might want to see https://github.com/utopia-php/database

@joeyouss
Copy link

Hi @subhamX , can I close this issue if this no longer happens for you?

@joeyouss joeyouss added the product / cloud Issues found only on Appwrite Cloud label Jul 29, 2023
@subhamX
Copy link
Author

subhamX commented Jul 30, 2023

I haven't checked this recently, but if you feel it has been patched, please close it. Really appreciate you all for being actively building & shipping feat.

@stnguyen90
Copy link
Contributor

Closing as this now returns a 400 error with an error of:

{
    "message": "Invalid query: Equal queries require at least one value.",
    "code": 400,
    "type": "general_argument_invalid",
    "version": "0.11.46"
}

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 / cloud Issues found only on Appwrite Cloud product / databases Fixes and upgrades for the Appwrite Database.
Projects
None yet
Development

No branches or pull requests

3 participants