Skip to content

Poor Error Response for Max Query Length (Instant Queries) #1178

@jtlisi

Description

@jtlisi

When running an instant query with a length greater than the MaxQueryLength set in cortex the returned error is not helpful.

Error: Query failed after 5 retries.

When run on a range query an explicit message is returned showing the reason the query failed:

{
  "status": "error",
  "errorType": "execution",
  "error": "rpc error: code = Code(400) desc = invalid query, length > limit (789h0m0s > 720h0m0s)",
  "message": "rpc error: code = Code(400) desc = invalid query, length > limit (789h0m0s > 720h0m0s)"
}

Ideally the error should be the same for both range and instant queries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/choreSomething that needs to be done; not a bug or a feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions