Json Serialization is failing only in a single Service Fabric Actor with Could not create an instance of type

69 views Asked by At

I have a Service Fabric Actor service that, when a request comes in, retrieves and deserializes a document from CosmosDb, processes the request to update the document and then saves it back to CosmosDb.

Yesterday one of the Actors started throwing the following exception: Exception: Newtonsoft.Json.JsonSerializationException Failed Method: Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject Message: Could not create an instance of type . Type is an interface or abstract class and cannot be instantiated. Path , line 1, position 1211.

It is only the one Actor that is throwing this exception. There are hundreds more that are handling the serialization just fine. And over the last 12 months the system has probably handled of 100,000 such documents.

I have been taken a copy of the document from CosmosDb and tested that it can be deserialized correctly. I have also ran unit tests against the code that retrieves and deserializes the document.

I cant find any issues with the document itself or the code.

Does anyone have any idea what could be causing this single actor to throw this exception?

0

There are 0 answers