Skip to content

修复调用微信接口异常重试逻辑问题 #2122

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

Merged
merged 1 commit into from
May 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ public class WxErrorException extends Exception {

private final WxError error;

private static final int DEFAULT_ERROR_CODE = -99;

public WxErrorException(String message) {
this(WxError.builder().errorCode(-1).errorMsg(message).build());
this(WxError.builder().errorCode(DEFAULT_ERROR_CODE).errorMsg(message).build());
}

public WxErrorException(WxError error) {
Expand All @@ -24,12 +26,10 @@ public WxErrorException(WxError error, Throwable cause) {

public WxErrorException(Throwable cause) {
super(cause.getMessage(), cause);
this.error = WxError.builder().errorCode(-1).errorMsg(cause.getMessage()).build();
this.error = WxError.builder().errorCode(DEFAULT_ERROR_CODE).errorMsg(cause.getMessage()).build();
}

public WxError getError() {
return this.error;
}


}