{"record":{"id":"abb8a63ec2105f25","repo":"spacedriveapp/spacedrive","slug":"rpc-response-status-response-statustext-tex","errorCode":null,"errorMessage":"RPC ${response.status} ${response.statusText}${text ? `: ${text}` : \"\"}","messagePattern":"RPC (.+?) (.+?)(.+?)` : \"\"\\}","errorType":"http","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/ts-client/src/transport.ts","lineNumber":258,"sourceCode":"\t// subscribers filter client-side.\n\tprivate sharedSource: EventSource | null = null;\n\tprivate sharedCallbacks = new Set<(event: any) => void>();\n\n\tconstructor(baseUrl: string = \"\") {\n\t\t// Strip trailing slash so `${baseUrl}/rpc` is well-formed.\n\t\tthis.baseUrl = baseUrl.replace(/\\/$/, \"\");\n\t}\n\n\tasync sendRequest(request: any): Promise<any> {\n\t\tconst response = await fetch(`${this.baseUrl}/rpc`, {\n\t\t\tmethod: \"POST\",\n\t\t\theaders: { \"Content-Type\": \"application/json\" },\n\t\t\tbody: JSON.stringify(request),\n\t\t});\n\n\t\tif (!response.ok) {\n\t\t\tconst text = await response.text().catch(() => \"\");\n\t\t\tthrow new Error(\n\t\t\t\t`RPC ${response.status} ${response.statusText}${text ? `: ${text}` : \"\"}`,\n\t\t\t);\n\t\t}\n\n\t\treturn await response.json();\n\t}\n\n\tasync subscribe(\n\t\tcallback: (event: any) => void,\n\t\t_options?: SubscriptionOptions,\n\t): Promise<() => void> {\n\t\tthis.sharedCallbacks.add(callback);\n\t\tthis.ensureSharedSource();\n\n\t\treturn () => {\n\t\t\tthis.sharedCallbacks.delete(callback);\n\t\t\tif (this.sharedCallbacks.size === 0 && this.sharedSource) {\n\t\t\t\tthis.sharedSource.close();","sourceCodeStart":240,"sourceCodeEnd":276,"githubUrl":"https://github.com/spacedriveapp/spacedrive/blob/6dfeccf2113039e35f2ce735f945e70dc3e4ea45/packages/ts-client/src/transport.ts#L240-L276","documentation":"Returned by FileSyncService::sync_now when the loaded conduit has enabled = false. The service refuses to compute or dispatch operations for disabled conduits before checking the active-sync map or calculating operations. Conduits are created with enabled: true, so this state comes from an explicit disable.","triggerScenarios":"Calling sync_now(conduit_id) on a conduit row where enabled was set to false (via whatever disable/toggle API or direct DB update), or on a freshly restored DB where the flag was persisted as false.","commonSituations":"User paused the sync pair in the UI; automation toggling conduits off during maintenance; a client retrying a scheduled sync against a conduit disabled moments earlier.","solutions":["Check the flag: SELECT id, enabled FROM sync_conduit WHERE id = <id>.","Re-enable the conduit (set enabled = true via the toggle API or UPDATE), then call sync_now again.","If it should stay disabled, remove it from the scheduler so sync_now is not invoked for it."],"exampleFix":"-- before\nSELECT enabled FROM sync_conduit WHERE id = 7; -- false\n\n-- after\nUPDATE sync_conduit SET enabled = true WHERE id = 7;","handlingStrategy":"validation","validationCode":"// Check the enabled flag before requesting a sync.\nasync fn can_sync_now(svc: &ConduitService, id: i32) -> Result<bool> {\n    Ok(svc.get_conduit(id).await?.enabled)\n}","typeGuard":null,"tryCatchPattern":"match svc.sync_now(id).await {\n    Ok(h) => Ok(h),\n    Err(e) if e.to_string() == \"Conduit is disabled\" => {\n        // user paused it: silently skip in schedulers, prompt in manual UI\n        Ok(skip_sync())\n    }\n    Err(e) => Err(e),\n}","preventionTips":["Schedulers should filter by list_enabled() instead of list_all() so disabled conduits are never triggered.","Reflect the enabled flag in UI controls (disable 'Sync now' when paused).","Log which conduit id was refused so paused-state surprises are traceable."],"tags":["rust","file-sync","feature-flag","validation"],"backgroundTag":null,"analyzedSha":"6dfeccf2113039e35f2ce735f945e70dc3e4ea45","analyzedAt":"2026-08-16T11:26:17.074Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}