-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix(connector): [coinbase][opennode][bitpay] handle error response #1406
Conversation
code: response.code, | ||
message: response.message, | ||
reason: response.reason, | ||
code: response.code.unwrap_or(format!("{}", res.status_code)), |
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.
code: response.code.unwrap_or(format!("{}", res.status_code)), | |
code: response.code.unwrap_or_else(|| consts::NO_ERROR_CODE.to_string()), |
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.
Done
pub struct OpennodeErrorResponse { | ||
pub status_code: u16, |
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.
Previously we had template code for ErrorResponse?
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.
Hey yes it was there, but I was not aware of that to change.
Type of Change
Description
Handle error response correctly for all crypto connectors.
Additional Changes
Motivation and Context
How did you test it?
Checklist
cargo +nightly fmt --all
cargo clippy