Service Stack Client "IsAny500" method may have bugs in Xamarin.iOS

Hi

I can not use IsAny500 to get corrent return value of exception. please check the png. my version is 4.0.42.

try
{
    await _service.ChangePassword(pwd);
    await _service.Logout();
    ViewModelStatus = new ViewModelStatus(UIConstants.UPDATE_SUCCESS, false, MessageType.Success, TipsType.DialogDisappearAuto);
    ShowViewModel<LoginViewModel>();
}
catch (WebServiceException ex)
{
    if (ex.IsAny500())
    {
        ViewModelStatus = new ViewModelStatus(ex.ErrorMessage, false, MessageType.Success, TipsType.DialogDisappearAuto);
    }
    else
    {
        ViewModelStatus = new ViewModelStatus(UIConstants.WEB_EXCEPTION, false, MessageType.Success, TipsType.DialogDisappearAuto);
    }
}
catch (Exception ex)
{
    Xamarin.Insights.Report(ex);
}

This isn’t a bug since IsAny500() is an extension method on HTTP Utils defined in ServiceStack.Text but you’re using it check against a WebServiceException defined in ServiceStack.Client which it can’t know about.

But I agree the behavior is unsurprising so I’ve added explicit methods on WebServiceException so it will the class methods instead of the extension method.

This change is now available on MyGet.