aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2024-01-18 17:58:57 -0500
committerluigi1111 <luigi1111w@gmail.com>2024-01-18 17:58:57 -0500
commit2eed43cef2aee5793cb113f50c772919e7140b17 (patch)
tree7ca6ac12c87e3ad996ac7c34a5807e18899e0ed0
parentMerge pull request #9056 (diff)
parentMMS: Ignore 2 more API errors thrown by latest PyBitmessage (diff)
downloadmonero-2eed43cef2aee5793cb113f50c772919e7140b17.tar.xz
Merge pull request #9059
2766d12 MMS: Ignore 2 more API errors thrown by latest PyBitmessage (rbrunner7)
-rw-r--r--src/wallet/message_transporter.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/wallet/message_transporter.cpp b/src/wallet/message_transporter.cpp
index b4f6ce7bd..e6c26cba0 100644
--- a/src/wallet/message_transporter.cpp
+++ b/src/wallet/message_transporter.cpp
@@ -273,16 +273,29 @@ bool message_transporter::post_request(const std::string &request, std::string &
{
if ((string_value.find("API Error 0021") == 0) && (request.find("joinChan") != std::string::npos))
{
+ // "API Error 0021: Unexpected API Failure"
// Error that occurs if one tries to join an already joined chan, which can happen
// if several auto-config participants share one PyBitmessage instance: As a little
// hack simply ignore the error. (A clean solution would be to check for the chan
// with 'listAddresses2', but parsing the returned array is much more complicated.)
}
+ else if ((string_value.find("API Error 0024") == 0) && (request.find("joinChan") != std::string::npos))
+ {
+ // "API Error 0024: Chan address is already present."
+ // Maybe a result of creating the chan in a slightly different way i.e. not with
+ // 'createChan'; everything works by just ignoring this error
+ }
else if ((string_value.find("API Error 0013") == 0) && (request.find("leaveChan") != std::string::npos))
{
+ // "API Error 0013: Could not find your fromAddress in the keys.dat file."
// Error that occurs if one tries to leave an already left / deleted chan, which can happen
// if several auto-config participants share one PyBitmessage instance: Also ignore.
}
+ else if ((string_value.find("API Error 0025") == 0) && (request.find("leaveChan") != std::string::npos))
+ {
+ // "API Error 0025: Specified address is not a chan address. Use deleteAddress API call instead."
+ // Error does not really make sense, but everything works by just ignoring
+ }
else
{
THROW_WALLET_EXCEPTION(tools::error::bitmessage_api_error, string_value);