diff --git a/Tapeti/Connection/TapetiConsumer.cs b/Tapeti/Connection/TapetiConsumer.cs index e55b024..57c31f2 100644 --- a/Tapeti/Connection/TapetiConsumer.cs +++ b/Tapeti/Connection/TapetiConsumer.cs @@ -133,7 +133,7 @@ namespace Tapeti.Connection addHandler(async (c, next) => { - await binding.Invoke(context, message); + await binding.Invoke(c, message); }); firstCaller.Call(context) diff --git a/Tapeti/TapetiConfig.cs b/Tapeti/TapetiConfig.cs index 32f5907..078e3c5 100644 --- a/Tapeti/TapetiConfig.cs +++ b/Tapeti/TapetiConfig.cs @@ -111,7 +111,7 @@ namespace Tapeti else if (middleware is IPublishMiddleware) Use((IPublishMiddleware)middleware); else - throw new ArgumentException($"Unsupported middleware implementation: {middleware.GetType().Name}"); + throw new ArgumentException($"Unsupported middleware implementation: {(middleware == null ? "null" : middleware.GetType().Name)}"); } }