Trying to figure out why there is a Binding error

I am receiving some errors on an endpoint, that is pushing data from a web hook (Mailgun).

Is there a way to “intercept” the original data that is pushed on the endpoint just to see why the error is thrown? This is only on very limited calls (<0,1%) but just trying to figure out what’s going on here?

Would be nice if I could just log the pushed content in such cases.

System.Runtime.Serialization.SerializationException: Unable to bind to request 'MailgunWebhook'
   at ServiceStack.Serialization.StringMapTypeDeserializer.PopulateFromMap(Object instance, IDictionary`2 keyValuePairs, List`1 ignoredWarningsOnPropertyNames) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack.Client\Serialization\StringMapTypeDeserializer.cs:line 106
   at ServiceStack.Host.RestPath.CreateRequest(String pathInfo, Dictionary`2 queryStringAndFormData, Object fromInstance) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack\Host\RestPath.cs:line 544
   at ServiceStack.Host.RestHandler.CreateRequest(IRequest httpReq, IRestPath restPath, Dictionary`2 requestParams, Object requestDto) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack\Host\RestHandler.cs:line 156
   at ServiceStack.Host.RestHandler.CreateRequestAsync(IRequest httpReq, IRestPath restPath, Dictionary`2 requestParams) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack\Host\RestHandler.cs:line 145
   at ServiceStack.Host.RestHandler.CreateRequestAsync(IRequest httpReq, IRestPath restPath) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack\Host\RestHandler.cs:line 136
   at ServiceStack.Host.RestHandler.ProcessRequestAsync(IRequest req, IResponse httpRes, String operationName) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack\Host\RestHandler.cs:line 89

If you want to inspect the request yourself you’d need to Buffer the Request first then you can call IRequest.GetRawBodyAsync() to read the request body.

I tried it with IRequiresRequestStream but then I received even more errors.
Although I did not
set the PreRequestFilters. I suppose this is mandatory, but are these then for ALL endpoints?

Inspect the IHttpRequest first so you only set it on which requests you want to buffer.