-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Inside of the App.Start method there is exception handling:
catch (Exception ex)
{
Status = Apps.Status.Stopped;
await Events.Emit(
null!,
EventType.Error,
new ErrorEvent() { Exception = ex }
);
}
The null! is causing a null reference exception and the user of the library is not getting the original call stack.
The exception happens in the OnErrorEvent on the sender.Equals
protected async Task OnErrorEvent(IPlugin sender, ErrorEvent @event, CancellationToken cancellationToken = default)
{
cancellationToken = @event.Context?.CancellationToken ?? cancellationToken;
Logger.Error(@event.Exception);
if (@event.Exception is HttpException ex)
{
Logger.Error(ex.Request?.RequestUri?.ToString());
if (ex.Request?.Content is not null)
{
var content = await ex.Request.Content.ReadAsStringAsync();
Logger.Error(content);
}
}
foreach (var plugin in Plugins)
{
if (sender.Equals(plugin)) continue;
await plugin.OnError(this, sender, @event, cancellationToken);
}
}
I would be more than happy to look into this and fix
Metadata
Metadata
Assignees
Labels
No labels