From 78f87efb0569d51daccfa3c7c6bf45190dc836e4 Mon Sep 17 00:00:00 2001 From: xywang Date: Tue, 1 Mar 2022 16:48:38 +0800 Subject: [PATCH] [TS-1214]: added error details in some conditions --- src/client/src/tscSql.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/src/tscSql.c b/src/client/src/tscSql.c index 3264290f7e..ae5a322b05 100644 --- a/src/client/src/tscSql.c +++ b/src/client/src/tscSql.c @@ -679,7 +679,11 @@ char *taos_errstr(TAOS_RES *tres) { } if (hasAdditionalErrorInfo(pSql->res.code, &pSql->cmd) || pSql->res.code == TSDB_CODE_RPC_FQDN_ERROR) { - return pSql->cmd.payload; + if (pSql->cmd.payload[0] != '\0') { + return pSql->cmd.payload; + } + + return (char*)tstrerror(pSql->res.code); } else { return (char*)tstrerror(pSql->res.code); } -- GitLab