mirror of
https://github.com/matrix-org/sliding-sync.git
synced 2025-03-10 13:37:11 +00:00

We returned an error in Initialise when there is no create event in the state block. If this happens, the poller automatically retries the same request, tightlooping as the data is always going to cause the same error. Instead, return an `internal.DataError` which is a way of expressly telling the pollers to continue and advance the since token. With regression test. NB: This regression test also caught a potential bug which this PR could have introduced. This PR lets the since token skip over bad responses, but we want to make damn sure we process EVERYTHING ELSE in that response. In particular, we could have skipped over large sections of `parseRoomsResponse` as we would bail early on errors. This is now fixed to bail only after processing the entire joined rooms map.