HttpClientEventDispatcher45 doesn't log full exception
ryandle opened this issue · 2 comments
ryandle commented
The following exception handling code in HttpClientEventDispatcher45 only logs the message:
catch (Exception ex)
{
Logger.Log(LogLevel.ERROR, string.Format("Error Dispatching Event: {0}", ex.Message));
}
Which results in logs like this:
Error Dispatching Event: An error occurred while sending the request.
There is probably a more helpful inner exception that is missing because only ex.Message is being logged.
I think this code should log ex.ToString() instead so that we get the inner exception details.
mikeproeng37 commented
Thanks for submitting this! We will look into it.
msohailhussain commented
Merged and released https://github.com/optimizely/csharp-sdk/pull/112/files