当server api没有认证信息时,返回没有sign的错误码

This commit is contained in:
imhao183
2021-03-24 15:13:57 +08:00
parent f6e9af58d4
commit 2421d02eb8
4 changed files with 7 additions and 6 deletions
@@ -55,7 +55,7 @@ abstract public class RobotAction extends Action {
}
if (StringUtil.isNullOrEmpty(nonce) || StringUtil.isNullOrEmpty(timestamp) || StringUtil.isNullOrEmpty(sign) || StringUtil.isNullOrEmpty(rid)) {
return ErrorCode.INVALID_PARAMETER;
return ErrorCode.ERROR_CODE_API_NOT_SIGNED;
}
if (!mLimitCounter.isGranted(rid)) {
@@ -68,7 +68,7 @@ abstract public class RobotAction extends Action {
} catch (Exception e) {
e.printStackTrace();
Utility.printExecption(LOG, e, IMExceptionEvent.EventType.ROBOT_API_Exception);
return ErrorCode.INVALID_PARAMETER;
return ErrorCode.ERROR_CODE_API_NOT_SIGNED;
}
if (System.currentTimeMillis() - ts > 2 * 60 * 60 * 1000) {