You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2019/08/23 01:43:59 UTC

[GitHub] [incubator-iotdb] jt2594838 commented on a change in pull request #350: [IOTDB-161] Add ErrorCode of different response errors

jt2594838 commented on a change in pull request #350: [IOTDB-161] Add ErrorCode of different response errors
URL: https://github.com/apache/incubator-iotdb/pull/350#discussion_r316947548
 
 

 ##########
 File path: server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
 ##########
 @@ -160,8 +161,7 @@ public TSOpenSessionResp openSession(TSOpenSessionReq req) throws TException {
       zoneIds.set(config.getZoneID());
       initForOneSession();
     } else {
-      tsStatus = new TS_Status(TS_StatusCode.ERROR_STATUS);
-      tsStatus.setErrorMessage("login failed. Username or password is wrong.");
+      tsStatus = getErrorStatus(ErrorCode.WRONG_LOGIN_PASSWORD_ERROR, "login failed. Username or password is wrong.");
 
 Review comment:
   Yes, I think the more clear the codes, the better, which will help the user faster locate the problem. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services