Skip to content

Commit

Permalink
Do not propagate error when parsing event JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
Somfic committed Mar 14, 2024
1 parent 409d483 commit 2535122
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EliteAPI/Events/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public IEvent Invoke<TEvent>(TEvent @event, EventContext context) where TEvent :
{
if (string.IsNullOrEmpty(json))
throw new ArgumentNullException(nameof(json));

var jObject = JObject.Parse(json);
var eventKey = jObject["event"];

Expand Down Expand Up @@ -287,7 +287,7 @@ public IEvent Invoke<TEvent>(TEvent @event, EventContext context) where TEvent :
ex.Data.Add("JSON", json);
ex.Data.Add("File", context.SourceFile);
_log?.LogWarning(ex, "Could not invoke event from JSON");
throw;
return null;
}
}

Expand Down

0 comments on commit 2535122

Please sign in to comment.