Skip to content

Commit

Permalink
Wallet not found now includes both status code 404 and 409 (#1026)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianwium authored Aug 15, 2024
1 parent 77ab221 commit 334c73e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public class ZltoClient : IRewardProviderClient, IMarketplaceProviderClient
private const string Header_Authorization = "Authorization";
private const string Header_Authorization_Value_Prefix = "Bearer";
private const string Image_Default_Empty_Value = "default";

private static readonly HttpStatusCode[] StatusCode_WalletNotFound = [HttpStatusCode.NotFound, HttpStatusCode.Conflict];
#endregion

#region Constructor
Expand Down Expand Up @@ -486,7 +488,7 @@ private async Task<WalletAccountInfo> CreateAccount(Domain.Reward.Models.Provide
}
catch (HttpClientException ex)
{
if (ex.StatusCode != HttpStatusCode.NotFound) throw;
if (!StatusCode_WalletNotFound.Contains(ex.StatusCode)) throw;
}

return null;
Expand Down

0 comments on commit 334c73e

Please sign in to comment.