When running the server in a docker environment, it seems as though the MongoDB documents are unable to serialize the stored data types as proper game events to return from the /events endpoint. This causes the server to throw 500 internal server errors and is actually a very big issue.
I think the issue is that MongoDB is trying to serializa a polymorphic class into a particular data type, but for some reason it can't do that sometimes?
Seems to work fine on an initial run but after the container stops and restarts it seems to lose knowledge about the ploymorphic types somehow? Uncertain honestly.
Possible Solutions
Store the event data as a JSON string and then desrialize it based on the EventDataType field, or figure out the Mongo polymorphic deserialization
When running the server in a docker environment, it seems as though the MongoDB documents are unable to serialize the stored data types as proper game events to return from the
/events
endpoint. This causes the server to throw 500 internal server errors and is actually a very big issue.I think the issue is that MongoDB is trying to serializa a polymorphic class into a particular data type, but for some reason it can't do that sometimes?
Seems to work fine on an initial run but after the container stops and restarts it seems to lose knowledge about the ploymorphic types somehow? Uncertain honestly.
Possible Solutions
Store the event data as a JSON string and then desrialize it based on the
EventDataType
field, or figure out the Mongo polymorphic deserialization