public void HandlePatchError(AggregateException exception) { var actualException = exception.ExtractSingleInnerException(); var message = actualException.TryReadResponseIfWebException().TryReadErrorPropertyFromJson(); PatchScriptErrorMessage.Value = string.IsNullOrEmpty(message) ? actualException.Message : message; IsErrorVisible.Value = true; }