Skip to content

Misleading error message when filtering primitive column by object value in tables #2275

@vkarpov15

Description

@vkarpov15

When I send the following command (_id is a text column):

{
  "updateOne": {
    "filter": {
      "_id": {
        "buffer": {
          "0": 105,
          "1": 49,
          "2": 174,
          "3": 41,
          "4": 164,
          "5": 8,
          "6": 93,
          "7": 224,
          "8": 230,
          "9": 86,
          "10": 162,
          "11": 208
        }
      }
    },
    "update": {
      "$set": {
        "aiSummary": null,
        "domain": "google.com"
      }
    },
    "options": {
      "upsert": true
    }
  }
}

I get back the following error:

Server internal error: Filter type not supported, unable to resolve to a filtering strategy

The issue was due to incorrect serialization due to duplicate copies of the bson package on my end, but I think the Data API error message could be better here. I would expect the error to output something along the lines of "buffer is not a supported query operator"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions