Tracker sometimes sends events as application/octet-stream to collector


we implemented the JS tracker on our website and it successfully sends events to our collector application. Sometimes though the tracker seems to send events to the collector with the Content-Type header set to ‘application/octet-stream’ instead of ‘application/json’. In the enricher application those ‘application/octet-stream’ events are then classified as bad events with a failure message similar to the following

"failure": {
   "timestamp": "2023-02-08T13:10:23.688460Z",
   "vendor": "com.snowplowanalytics.snowplow",
   "version": "tp2",
      "messages": [
            "field": "contentType",
            "value": "application/octet-stream",
            "expectation": "expected one of application/json, application/json; charset=utf-8, application/json; charset=UTF-8"

Has anyone an idea on how that can be fixed so that all events send from the tracker have the Content-Type set to ‘applicaiton/json’?

Thx in advance and kind regards!

Do you happen to have any more information around the type of events, tracker versions etc? The Javascript tracker sets this explicitly so it’s quite unusual to see the octet-stream content type.