{"record":{"id":"f948691288947a28","repo":"clockworklabs/SpacetimeDB","slug":"could-not-serialize-result-object-had-neither-a","errorCode":null,"errorMessage":"could not serialize result: object had neither a `ok` nor an `err` field","messagePattern":"could not serialize result: object had neither a `ok` nor an `err` field","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"crates/bindings-typescript/src/lib/algebraic_type.ts","lineNumber":672,"sourceCode":"    ) {\n      const serializeOk = AlgebraicType.makeSerializer(\n        ty.variants[0].algebraicType,\n        typespace\n      );\n      const serializeErr = AlgebraicType.makeSerializer(\n        ty.variants[0].algebraicType,\n        typespace\n      );\n\n      return (writer, value) => {\n        if ('ok' in value) {\n          writer.writeU8(0);\n          serializeOk(writer, value.ok);\n        } else if ('err' in value) {\n          writer.writeU8(1);\n          serializeErr(writer, value.err);\n        } else {\n          throw new TypeError(\n            'could not serialize result: object had neither a `ok` nor an `err` field'\n          );\n        }\n      };\n    } else {\n      let serializer = SERIALIZERS.get(ty);\n      if (serializer != null) return serializer;\n\n      const serializers: Record<string, Serializer<any>> = {};\n\n      const body = `\\\nswitch (value.tag) {\n${ty.variants\n  .map(\n    ({ name }, i) => `\\\n  case ${JSON.stringify(name!)}:\n    writer.writeByte(${i});\n    return this.${name!}(writer, value.value);`","sourceCodeStart":654,"sourceCodeEnd":690,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/6dee26c6efc2856793e12b148a59742964f5d783/crates/bindings-typescript/src/lib/algebraic_type.ts#L654-L690","documentation":"spacetime update install <version> accepts an --edition flag (comma-separated list, default \"standalone\"), but the installer currently implements only the standalone edition. The guard requires the parsed list to equal exactly [\"standalone\"]; anything else fails before any network I/O happens.","triggerScenarios":"Running spacetime update install 1.7.0 --edition cloud, --edition enterprise, or a multi-value like --edition standalone,cloud (value_delimiter=',' splits it into a list that no longer equals [\"standalone\"]).","commonSituations":"Assuming a cloud/enterprise edition can be installed locally with this CLI; scripts or docs carrying an edition flag; templates inserting the flag automatically.","solutions":["Drop the --edition flag entirely; the default is standalone.","If you must pass it, pass exactly --edition standalone (single value, no extra list entries).","For hosted deployments, use the server/provider provisioning flow instead of the local installer."],"exampleFix":"# before\nspacetime update install 1.7.0 --edition cloud\n\n# after\nspacetime update install 1.7.0","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Omit --edition in install scripts; the default is standalone.","Do not add edition values copied from issue threads or future docs until the installer supports them.","Pin install scripts to a known-good version of the CLI so new flags do not break CI."],"tags":["spacetimedb","cli","install","edition","unsupported-flag"],"backgroundTag":"unsupported-option-value","analyzedSha":"6dee26c6efc2856793e12b148a59742964f5d783","analyzedAt":"2026-08-20T06:08:37.179Z","contentChangedAt":"2026-08-20T06:08:37.179Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}