Skip to content

Commit

Permalink
Fixes #50 Preserve extended data on 404's
Browse files Browse the repository at this point in the history
  • Loading branch information
niemyjski committed Nov 23, 2015
1 parent 29d1431 commit 5538bda
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
4 changes: 1 addition & 3 deletions Source/Platforms/Nancy/ExceptionlessNancyPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ public void Run(EventPluginContext context) {
if (requestInfo == null)
return;

if (context.Event.Type == Event.KnownTypes.NotFound) {
if (context.Event.Type == Event.KnownTypes.NotFound)
context.Event.Source = requestInfo.GetFullPath(includeHttpMethod: true, includeHost: false, includeQueryString: false);
context.Event.Data.Clear();
}

context.Event.AddRequestInfo(requestInfo);
}
Expand Down
1 change: 0 additions & 1 deletion Source/Platforms/Web/ExceptionlessWebPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public void Run(EventPluginContext context) {
if (httpCode == 404) {
context.Event.Type = Event.KnownTypes.NotFound;
context.Event.Source = requestInfo.GetFullPath(includeHttpMethod: true, includeHost: false, includeQueryString: false);
context.Event.Data.Clear();
}
}

Expand Down
1 change: 0 additions & 1 deletion Source/Platforms/WebApi/ExceptionlessWebApiPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public void Run(EventPluginContext context) {
if (error != null && error.Code == "404") {
context.Event.Type = Event.KnownTypes.NotFound;
context.Event.Source = requestInfo.GetFullPath(includeHttpMethod: true, includeHost: false, includeQueryString: false);
context.Event.Data.Clear();
}

context.Event.AddRequestInfo(requestInfo);
Expand Down

0 comments on commit 5538bda

Please sign in to comment.