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

Provide more specific error when other wallet is outdated #162

Merged
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
10 changes: 9 additions & 1 deletion impls/src/adapters/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,15 @@ impl HTTPWalletCommAdapter {
});

let res: String = post(url, None, &req).map_err(|e| {
let report = format!("Performing version check (is recipient listening?): {}", e);
let mut report = format!("Performing version check (is recipient listening?): {}", e);
let err_string = format!("{}", e);
if err_string.contains("404") {
// Report that the other version of the wallet is out of date
report = format!(
"Other wallet is incompatible and requires an upgrade. \
Please urge the other wallet owner to upgrade and try the transaction again."
);
}
error!("{}", report);
ErrorKind::ClientCallback(report)
})?;
Expand Down