Compare commits

..

2 Commits

1 changed files with 5 additions and 3 deletions

View File

@ -120,15 +120,15 @@ namespace AyCode.Blazor.Components.Services
{
return GetAllAsync<List<T>>(messageTag, response =>
{
intoList.Clear();
if (response.Status != SignalResponseStatus.Success || response.ResponseData == null)
{
Logger.Error($"GetAllIntoAsync<{typeof(T).Name}>(); status: {response.Status}; dataCount: {response.ResponseData?.Count}; {ConstHelper.NameByValue(TagsName, messageTag)};");
return Task.CompletedTask;
}
intoList.Clear();
intoList.AddRange(response.ResponseData);
return Task.CompletedTask;
}, contextParams);
}
@ -160,7 +160,9 @@ namespace AyCode.Blazor.Components.Services
Logger.Error(errorText);
//TODO: Ideiglenes, majd a ResponseMessage-et kell visszaadni a Status miatt! - J.
throw new Exception(errorText);
return await Task.FromException<TResponse>(new Exception(errorText));
//throw new Exception(errorText);
//return default;
}