From 5538bda9729798a57c08fde52f2ac24aed9d9133 Mon Sep 17 00:00:00 2001 From: Blake Niemyjski Date: Mon, 23 Nov 2015 17:47:17 -0600 Subject: [PATCH] Fixes #50 Preserve extended data on 404's --- Source/Platforms/Nancy/ExceptionlessNancyPlugin.cs | 4 +--- Source/Platforms/Web/ExceptionlessWebPlugin.cs | 1 - Source/Platforms/WebApi/ExceptionlessWebApiPlugin.cs | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Source/Platforms/Nancy/ExceptionlessNancyPlugin.cs b/Source/Platforms/Nancy/ExceptionlessNancyPlugin.cs index ea15854c..cdc643f9 100644 --- a/Source/Platforms/Nancy/ExceptionlessNancyPlugin.cs +++ b/Source/Platforms/Nancy/ExceptionlessNancyPlugin.cs @@ -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); } diff --git a/Source/Platforms/Web/ExceptionlessWebPlugin.cs b/Source/Platforms/Web/ExceptionlessWebPlugin.cs index 43de7b55..12d2ce6f 100644 --- a/Source/Platforms/Web/ExceptionlessWebPlugin.cs +++ b/Source/Platforms/Web/ExceptionlessWebPlugin.cs @@ -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(); } } diff --git a/Source/Platforms/WebApi/ExceptionlessWebApiPlugin.cs b/Source/Platforms/WebApi/ExceptionlessWebApiPlugin.cs index 6ba64e3e..24740779 100644 --- a/Source/Platforms/WebApi/ExceptionlessWebApiPlugin.cs +++ b/Source/Platforms/WebApi/ExceptionlessWebApiPlugin.cs @@ -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);