@@ -211,11 +211,11 @@ YTsaurusClient::SchemaDescription YTsaurusClient::getTableSchema(const String &
211211 const auto & schema_json = schema.extract <Poco::JSON::Object::Ptr>();
212212
213213 if (!schema_json->has (" $attributes" ))
214- throw Exception (ErrorCodes::LOGICAL_ERROR , " No \" $attributes\" property in yt table schema" );
214+ throw Exception (ErrorCodes::INCORRECT_DATA , " No \" $attributes\" property in yt table schema" );
215215
216216 auto attributes = schema_json->get (" $attributes" ).extract <Poco::JSON::Object::Ptr>();
217217 if (!attributes->has (" strict" ))
218- throw Exception (ErrorCodes::LOGICAL_ERROR , " Broken YtSaurus schema json. Missing `strict` field in attributes." );
218+ throw Exception (ErrorCodes::INCORRECT_DATA , " Broken YtSaurus schema json. Missing `strict` field in attributes." );
219219
220220 bool is_strict = attributes->getValue <bool >(" strict" );
221221
@@ -225,7 +225,7 @@ YTsaurusClient::SchemaDescription YTsaurusClient::getTableSchema(const String &
225225
226226 if (!schema_json->has (" $value" ))
227227 {
228- throw Exception (ErrorCodes::LOGICAL_ERROR , " No \" $value\" property in yt table schema" );
228+ throw Exception (ErrorCodes::INCORRECT_DATA , " No \" $value\" property in yt table schema" );
229229 }
230230
231231 auto columns_array = schema_json->get (" $value" ).extract <Poco::JSON::Array::Ptr>();
@@ -234,7 +234,7 @@ YTsaurusClient::SchemaDescription YTsaurusClient::getTableSchema(const String &
234234 for (const auto & yt_column : *columns_array) {
235235 const auto & yt_column_json = yt_column.extract <Poco::JSON::Object::Ptr>();
236236 if (!yt_column_json->has (" name" ))
237- throw Exception (ErrorCodes::LOGICAL_ERROR , " Broken YtSaurus schema json. Missing `name` field." );
237+ throw Exception (ErrorCodes::INCORRECT_DATA , " Broken YtSaurus schema json. Missing `name` field." );
238238
239239 auto yt_column_name = yt_column_json->getValue <String>(" name" );
240240 auto data_type = convertYTSchema (yt_column_json);
0 commit comments