diff --git a/CHANGELOG.md b/CHANGELOG.md
index ca566b5..3f3323b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,9 @@
-# 0.6.2
+# 0.6.3
+Released: 2017/09/04
+
+- Use per-request dependencies for handling RollbarClient to prevent errors.
+
+# 0.6.2
Released: 2017/8/20
- Change method trace string to have full namespace, method name and parameters.
diff --git a/src/RollbarDotNet/Core/ExceptionHandlerMiddleware.cs b/src/RollbarDotNet/Core/ExceptionHandlerMiddleware.cs
index e821e54..484e61c 100644
--- a/src/RollbarDotNet/Core/ExceptionHandlerMiddleware.cs
+++ b/src/RollbarDotNet/Core/ExceptionHandlerMiddleware.cs
@@ -7,18 +7,14 @@
public class ExceptionHandlerMiddleware
{
public ExceptionHandlerMiddleware(
- RequestDelegate next,
- Rollbar rollbar)
+ RequestDelegate next)
{
this.Next = next;
- this.Rollbar = rollbar;
}
protected RequestDelegate Next { get; set; }
-
- protected Rollbar Rollbar { get; set; }
- public async Task Invoke(HttpContext context)
+ public async Task Invoke(HttpContext context, Rollbar rollbar)
{
try
{
@@ -26,7 +22,7 @@ public async Task Invoke(HttpContext context)
}
catch(Exception exception)
{
- var response = await this.Rollbar.SendException(exception);
+ var response = await rollbar.SendException(exception);
var rollbarResponseFeature = new RollbarResponseFeature
{
Handled = true,
diff --git a/src/RollbarDotNet/RollbarDotNet.csproj b/src/RollbarDotNet/RollbarDotNet.csproj
index ee87358..ddb42d8 100644
--- a/src/RollbarDotNet/RollbarDotNet.csproj
+++ b/src/RollbarDotNet/RollbarDotNet.csproj
@@ -4,7 +4,7 @@
Rollbar Integration for .NET Core
William Roush 2016-2017
RollbarDotNet
- 0.6.2
+ 0.6.3
William Roush
RollbarDotNet
RollbarDotNet
diff --git a/test/RollbarDotNet.Tests/DependencyInjection/WebDependencyInjectionTests.cs b/test/RollbarDotNet.Tests/DependencyInjection/WebDependencyInjectionTests.cs
index e7c62bb..fd3e495 100644
--- a/test/RollbarDotNet.Tests/DependencyInjection/WebDependencyInjectionTests.cs
+++ b/test/RollbarDotNet.Tests/DependencyInjection/WebDependencyInjectionTests.cs
@@ -21,7 +21,7 @@ public WebDependencyInjectionTests()
.AddSingleton(mockHostingEnvironment.Object);
services.Configure(o =>
{
- o.AccessToken = Environment.GetEnvironmentVariable("ROLLBAR_TOKEN") ?? "992eb96a7d4b4d62bd529188bb8152cb";
+ o.AccessToken = Environment.GetEnvironmentVariable("ROLLBAR_TOKEN");
o.Environment = "Testing";
});