TyrantLucifer commented on code in PR #3524:
URL:
https://github.com/apache/incubator-seatunnel/pull/3524#discussion_r1031037271
##########
seatunnel-connectors-v2/connector-google-sheets/src/main/java/org/apache/seatunnel/connectors/seatunnel/google/sheets/deserialize/GoogleSheetsDeserializer.java:
##########
@@ -50,7 +52,8 @@ public SeaTunnelRow deserializeRow(List<Object> row) {
String rowStr = objectMapper.writeValueAsString(map);
return deserializationSchema.deserialize(rowStr.getBytes());
} catch (IOException e) {
- throw new RuntimeException("Object json deserialization
exception.", e);
+ throw new
GoogleSheetsConnectorException(GoogleSheetsConnectorErrorCode.OBJECT_JSON_DESERIALIZATION_FAILD,
Review Comment:
`CommonErrorCode.JSON_OPERATION_FAILED` is better
##########
docs/en/connector-v2/Error-Quick-Reference-Manual.md:
##########
@@ -61,3 +61,9 @@ This document records some common error codes and
corresponding solutions of Sea
| SOCKET-01 | Cannot connect to socket server | When
the user encounters this error code, it means that the connection address may
not match, please check |
| SOCKET-02 | Failed to send message to socket server | When
the user encounters this error code, it means that there is a problem sending
data and retry is not enabled, please check |
| SOCKET-03 | Unable to write; interrupted while doing another attempt | When
the user encounters this error code, it means that the data writing is
interrupted abnormally, please check |
+
Review Comment:
Remove redundant error codes.
##########
seatunnel-connectors-v2/connector-google-sheets/src/main/java/org/apache/seatunnel/connectors/seatunnel/google/sheets/exception/GoogleSheetsConnectorErrorCode.java:
##########
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.google.sheets.exception;
Review Comment:
Remove redundant error codes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]