muscles

Error codes

An error body is {"error":"<message>","code":"<code>"}. The message is for people and can change. The code is stable. This page lists the ten codes that /api/query writes in the code field. Other errors carry only a message. The ClickHouse HTTP interface responds with the ClickHouse number in the second column when there is one. Where the column is empty, it takes the number from the HTTP status: 62 for 400, 516 for 401, 497 for 403, 60 for 404 and 999 for any other status. exists and replica_read_only are 409 responses, so they give 999.

CodeClickHouse numberDescription
existsA table, view, index, rollup, dictionary, rule or policy of this name already exists.
replica_read_onlyThe node is a replication replica and refuses client writes and DDL.
not_foundThe named object does not exist.
access_deniedA policy denies the caller the table or database that a write targets.
result_row_cap_exceeded396The result has more rows than max_query_rows and result_overflow_mode is throw.
illegal_aggregation184An aggregate function stands where none may stand: inside another aggregate, or in WHERE or GROUP BY.
unknown_function46The query calls a function that does not exist.
cyclic_aliases174SELECT aliases are defined through each other.
illegal_type_of_filter59A WHERE, HAVING or -If condition is one value of a type with no truth value, such as text, Decimal, Date or an array.
decimal_scale_out_of_bounds69The scales of multiplied or divided decimals add up past the width of the result type.