We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1cd42eb commit 7ac7056Copy full SHA for 7ac7056
clients/algoliasearch-client-csharp/algoliasearch/Serializer/DefaultSerializer.cs
@@ -32,12 +32,14 @@ public string Serialize(object data)
32
}
33
catch (Exception ex)
34
{
35
+ var dataType = data?.GetType()?.ToString() ?? "unknown";
36
+
37
if (_logger.IsEnabled(LogLevel.Error))
38
- _logger.LogError(ex, "Error while serializing object of type {Type}", data.GetType());
39
+ _logger.LogError(ex, "Error while serializing object of type {Type}", dataType);
40
41
- throw new AlgoliaException($"Error while serializing object of type {data.GetType()}", ex);
42
+ throw new AlgoliaException($"Error while serializing object of type {dataType}", ex);
43
44
45
0 commit comments