{"record":{"id":"af01033f4ec01e03","repo":"tursodatabase/turso","slug":"zstd-encoding-is-not-supported","errorCode":null,"errorMessage":"Zstd encoding is not supported","messagePattern":"Zstd encoding is not supported","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"cli/sync_server.rs","lineNumber":602,"sourceCode":"                query_duration_ms: 0.0,\n            })\n        }\n    }\n\n    fn handle_pull_updates(&self, db: &DbHandle, body: &[u8]) -> Result<HttpResponse> {\n        let req = <PullUpdatesReqProtoBody as Message>::decode(body)\n            .map_err(|e| anyhow!(\"Failed to decode PullUpdatesRequest: {}\", e))?;\n\n        debug!(\n            \"Pull updates request: server_revision={}, client_revision={}\",\n            req.server_revision, req.client_revision\n        );\n\n        let encoding =\n            PageUpdatesEncodingReq::try_from(req.encoding).unwrap_or(PageUpdatesEncodingReq::Raw);\n\n        if encoding == PageUpdatesEncodingReq::Zstd {\n            return Err(anyhow!(\"Zstd encoding is not supported\"));\n        }\n\n        if PullUpdatesStreamKind::try_from(req.stream_kind).unwrap_or(PullUpdatesStreamKind::Pages)\n            == PullUpdatesStreamKind::MvccLogicalLog\n        {\n            return self.handle_logical_pull_updates(db, &req);\n        }\n\n        self.handle_page_pull_updates(db, &req, PullUpdatesApplyMode::Incremental)\n    }\n\n    fn handle_page_pull_updates(\n        &self,\n        db: &DbHandle,\n        req: &PullUpdatesReqProtoBody,\n        apply_mode: PullUpdatesApplyMode,\n    ) -> Result<HttpResponse> {\n        let conn = db.conn.lock().unwrap();","sourceCodeStart":584,"sourceCodeEnd":620,"githubUrl":"https://github.com/tursodatabase/turso/blob/492c4a71cd7c2649e7df83da1471b74f4b1c7aa9/cli/sync_server.rs#L584-L620","documentation":"The pull request set the page-updates encoding to Zstd, but this test sync server implements only Raw page encoding and rejects compressed pulls outright. Note that unknown encoding values are mapped to Raw via try_from(...).unwrap_or(Raw), so only an explicit Zstd request produces this error.","triggerScenarios":"Setting encoding to the Zstd variant in a PullUpdatesRequest against this server; enabling response/page compression in the sync client configuration and issuing a page pull.","commonSituations":"Copying client configuration from Turso Cloud (which supports compression) to the local test sync server; a newer client defaulting to zstd; testing a compression path against a server that never implemented it.","solutions":["Set the client's page-updates encoding to Raw for this server","Disable page/response compression in the sync client settings","If compression is required, run a server build that implements Zstd page encoding instead of this test server"],"exampleFix":"// before\nreq.encoding = PageUpdatesEncodingReq::Zstd as i32;\n\n// after\nreq.encoding = PageUpdatesEncodingReq::Raw as i32;","handlingStrategy":"fallback","validationCode":"// client side: only Raw is supported by this server\nconst SUPPORTED_ENCODINGS = new Set(['Raw']);\nif (!SUPPORTED_ENCODINGS.has(encoding)) encoding = 'Raw';","typeGuard":null,"tryCatchPattern":"try {\n    await client.pull({ encoding: wanted });\n} catch (e) {\n    if (String(e).includes('Zstd encoding is not supported')) {\n        await client.pull({ encoding: 'Raw' }); // retry uncompressed\n    } else throw e;\n}","preventionTips":["Default the sync client to Raw against local/test servers","Check server capability before enabling compression, rather than assuming cloud defaults"],"tags":["sync-server","compression","zstd","unsupported-encoding"],"backgroundTag":"unsupported-encoding","analyzedSha":"492c4a71cd7c2649e7df83da1471b74f4b1c7aa9","analyzedAt":"2026-08-20T07:02:18.389Z","contentChangedAt":"2026-08-20T07:02:18.389Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}