Skip to content
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

Merged
merged 7 commits into from
Sep 7, 2022

Conversation

jsonwan
Copy link
Collaborator

@jsonwan jsonwan commented Sep 7, 2022

消息发送预览时改用同步发送,以便及时测试通知渠道是否通畅。

} 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[]{});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个接口调用失败似乎应该是INTERNAL_ERROR,而不是FAILED_PRECONDITION

Copy link
Collaborator Author

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());
Copy link
Collaborator

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)更加简洁

Copy link
Collaborator Author

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);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的异常用ERROR应该会更加合理;warn 一般表示可以被忽略的错误,但是这里如果出错的话,还是需要平台管理员介入的

Copy link
Collaborator Author

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[]{});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ErrorType不对

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

@wangyu096
Copy link
Collaborator

ok

@jsonwan jsonwan merged commit 2795654 into TencentBlueKing:3.5.x Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants