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

[Tables] updateOne with slice condition on the clustering columns returns HTTP 500 and an internal server error #1758

Open
hemidactylus opened this issue Nov 25, 2024 · 1 comment
Labels
Bug Something isn't working Feature - Tables Issue impacts the users of Tables To-Do

Comments

@hemidactylus
Copy link
Contributor

Table:

CREATE TABLE default_keyspace.x (
    a int,
    b int,
    x int,
    PRIMARY KEY (a, b)
) WITH CLUSTERING ORDER BY (b ASC)

updateOne payload:

{
    "updateOne": {
        "filter": {
            "a": 10,
            "b": {"$gt": 1}
        },
        "update": {"$set": {"x": 1}}
    }
}

The API returns with a 500 instead of a controlled 200-with-error (as it should):

{
    "errors": [
        {
            "message": "An unexpected server error occurred while processing the request. \n\nError Class: InvalidQueryException\nError Message: Slice restrictions are not supported on the clustering columns in UPDATE statements",
            "scope": "",
            "errorCode": "UNEXPECTED_SERVER_ERROR",
            "id": "3dffdbc6-92a3-4a44-a3ce-105e4577c557",
            "family": "SERVER",
            "title": "Unexpected server error"
        }
    ]
}
@amorton amorton added Bug Something isn't working Feature - Tables Issue impacts the users of Tables labels Dec 11, 2024
@amorton
Copy link
Contributor

amorton commented Dec 11, 2024

we should retest this after the fix for #1729 I think we made it return a better error there

@amorton amorton added the To-Do label Dec 11, 2024
@amorton amorton changed the title [Tables] updateOne with slice condition on the clustering columns gets a 500 Int.Ser.Err [Tables] updateOne with slice condition on the clustering columns returns HTTP 500 and an internal server error Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Feature - Tables Issue impacts the users of Tables To-Do
Projects
None yet
Development

No branches or pull requests

2 participants