chore: graph ql errors more info. Plus vehicle dictionary mapping error fix

This commit is contained in:
Mikhail Shabanov committed 2022-08-20 17:16:57 +02:00
1 parent 7d524fcdcd
commit 416f631d3f
7 files changed
+20 -15

No files matched your search

@@ -39,13 +39,14 @@ namespace WotBlitzStatisticsPro.Blazor.Services
_jsRuntime.InvokeVoidAsync("console.warn", summary, message);
}
public void ReportError(string summary, string message)
public void ReportError(string summary, string message, string? stacktrace)
{
Type = NotificationType.Error;
Message = message;
Summary = summary;
MessageArrived?.Invoke();
_jsRuntime.InvokeVoidAsync("console.error", summary, message);
Console.WriteLine(message);
_jsRuntime.InvokeVoidAsync("console.error", summary, string.IsNullOrEmpty(stacktrace) ? message : $"{message}; {stacktrace}");
}
}
}