Altinity / clickhouse-sink-connector

Replicate data from MySQL, Postgres and MongoDB to ClickHouse
https://www.altinity.com
Apache License 2.0
196 stars 48 forks source link

Return a HTTP error(instead of 200) when the show_replica_status REST API call fails. #657

Open subkanthi opened 1 week ago

subkanthi commented 1 week ago

Currently if there is an error in the show_replica_status call, 200 error is returned. Instead of 200, if there is an error, an error code needs to be returned along with the cause of the error.

subkanthi commented 6 days ago
./sink-connector-client show_replica_status
{
  "error": "java.sql.BatchUpdateException: Code: 60. DB::Exception: Unknown table expression identifier 'replica_source_info' in scope SELECT * FROM replica_source_info LIMIT 1. (UNKNOWN_TABLE) (version 24.5.3.5 (official build))\n, server ClickHouseNode [uri=http:\/\/localhost:8123\/system, options={custom_settings=allow_experimental_object_type=1,insert_allow_materialized_columns=1,client_name=Client_1}]@177934022"
}