-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugfix: 全局设置消息预览在发送失败的情况下仍提示发送成功 #1225 #1257
bugfix: 全局设置消息预览在发送失败的情况下仍提示发送成功 #1225 #1257
Conversation
} catch (Exception e) { | ||
log.error("Fail to request {}", uri, e); | ||
status = EsbMetricTags.VALUE_STATUS_ERROR; | ||
return false; | ||
throw new PaasException(e, ErrorType.FAILED_PRECONDITION, ErrorCode.CMSI_API_ACCESS_ERROR, new Object[]{}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个接口调用失败似乎应该是INTERNAL_ERROR,而不是FAILED_PRECONDITION
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
"receivers is empty of channel {}, do not send notification", | ||
channel | ||
); | ||
log.warn(msg.getMessage()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
直接log.warn("receivers is empty of channel {}, do not send notification", channel)更加简洁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
); | ||
result = true; | ||
} catch (Exception e) { | ||
log.warn("Fail to sendMsg", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的异常用ERROR应该会更加合理;warn 一般表示可以被忽略的错误,但是这里如果出错的话,还是需要平台管理员介入的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
} catch (Exception e) { | ||
log.error("Fail to request {}", uri, e); | ||
status = EsbMetricTags.VALUE_STATUS_ERROR; | ||
return false; | ||
throw new PaasException(e, ErrorType.FAILED_PRECONDITION, ErrorCode.CMSI_API_ACCESS_ERROR, new Object[]{}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ErrorType不对
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
ok |
消息发送预览时改用同步发送,以便及时测试通知渠道是否通畅。