Removed colon from exception message, fixed StartsWIth check
MODIFY
WalletWasabi/Services/IndexDownloader.cs
WalletWasabi/Services/IndexDownloader.cs
@@ -161,7 +161,7 @@ namespace WalletWasabi.Services
continue;
}
}
- catch (HttpRequestException ex) when (bestKnownFilter != null && ex.Message.StartsWith("Not Found: Provided bestKnownBlockHash is not found:"))
+ catch (HttpRequestException ex) when (bestKnownFilter != null && ex.Message.StartsWith("Not Found\nProvided bestKnownBlockHash is not found:"))
{
// Reorg happened
var reorgedHash = bestKnownFilter.BlockHash;

MODIFY
WalletWasabi/WebClients/ChaumianCoinJoin/WasabiClient.cs
WalletWasabi/WebClients/ChaumianCoinJoin/WasabiClient.cs
@@ -38,7 +38,7 @@ namespace WalletWasabi.WebClients.ChaumianCoinJoin
{
string error = await response.Content.ReadAsJsonAsync<string>();
var errorMessage = error == null ? string.Empty : $"\n{error}";
- throw new HttpRequestException($"{response.StatusCode.ToReasonString()}: {errorMessage}");
+ throw new HttpRequestException($"{response.StatusCode.ToReasonString()}{errorMessage}");
}
using(HttpContent content = response.Content)
@@ -59,7 +59,7 @@ namespace WalletWasabi.WebClients.ChaumianCoinJoin
{
string error = await response.Content.ReadAsJsonAsync<string>();
var errorMessage = error == null ? string.Empty : $"\n{error}";
- throw new HttpRequestException($"{response.StatusCode.ToReasonString()}: {errorMessage}");
+ throw new HttpRequestException($"{response.StatusCode.ToReasonString()}{errorMessage}");
}
using (HttpContent content = response.Content)
@@ -79,7 +79,7 @@ namespace WalletWasabi.WebClients.ChaumianCoinJoin
{
string error = await response.Content.ReadAsJsonAsync<string>();
var errorMessage = error == null ? string.Empty : $"\n{error}";
- throw new HttpRequestException($"{response.StatusCode.ToReasonString()}: {errorMessage}");
+ throw new HttpRequestException($"{response.StatusCode.ToReasonString()}{errorMessage}");
}
}
}
@@ -106,7 +106,7 @@ namespace WalletWasabi.WebClients.ChaumianCoinJoin
{
string error = await response.Content.ReadAsJsonAsync<string>();
var errorMessage = error == null ? string.Empty : $"\n{error}";
- throw new HttpRequestException($"{response.StatusCode.ToReasonString()}: {errorMessage}");
+ throw new HttpRequestException($"{response.StatusCode.ToReasonString()}{errorMessage}");
}
using(HttpContent content = response.Content)

Removed colon from exception message, fixed StartsWIth check