ccoffline commented on a change in pull request #6416: URL: https://github.com/apache/incubator-doris/pull/6416#discussion_r699063188
########## File path: fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/TableRowCountAction.java ########## @@ -61,15 +61,12 @@ public Object count( String fullDbName = getFullDbName(dbName); // check privilege for select, otherwise return HTTP 401 checkTblAuth(ConnectContext.get().getCurrentUserIdentity(), fullDbName, tblName, PrivPredicate.SELECT); - Database db = Catalog.getCurrentCatalog().getDb(fullDbName); - if (db == null) { - return ResponseEntityBuilder.okWithCommonError("Database [" + dbName + "] " + "does not exists"); - } - OlapTable olapTable = null; + OlapTable olapTable; try { - olapTable = (OlapTable) db.getTableOrThrowException(tblName, Table.TableType.OLAP); + Database db = Catalog.getCurrentCatalog().getDbOrMetaException(fullDbName); + olapTable = db.getTableOrMetaException(tblName, Table.TableType.OLAP); } catch (MetaNotFoundException e) { - return ResponseEntityBuilder.okWithCommonError(e.getMessage()); + return ResponseEntityBuilder.notFound(e.getMessage()); Review comment: ok -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org