smi2 / phpClickHouse

php ClickHouse wrapper
MIT License
750 stars 139 forks source link

Error code not parsed after Clickhouse update #181

Open gordinskiy opened 1 year ago

gordinskiy commented 1 year ago

After update ClickHouse version from 20.8.2.3 to 22.8.9.24 exceptions thrown by this package have changed.


ClickHouse v20.8.2.3:

Response body:

Code: 516, e.displayText() = DB::Exception: Username: Authentication failed: password is incorrect or there is no user with such name (version 20.8.2.3 (official build))

Exception:

\ClickHouseDB\Exception\DatabaseException

Exception Message:

Username: Authentication failed: password is incorrect or there is no user with such name IN:show databases FORMAT JSON

Exception Code: 516


ClickHouse v22.8.9.24:

Response body:

Code: 516. DB::Exception: Username: Authentication failed: password is incorrect or there is no user with such name. (AUTHENTICATION_FAILED) (version 22.8.9.24 (official build))

Exception:

\ClickHouseDB\Exception\QueryException

Exception Message:

HttpCode:403 ; ;Code: 516. DB::Exception: Username: Authentication failed: password is incorrect or there is no user with such name. (AUTHENTICATION_FAILED) (version 22.8.9.24 (official build))

Exception Code: 403

Can it be fixed in this package or it is Clickhouse problem?