{"record":{"id":"57078d12903fa910","repo":"dagger/dagger","slug":"decode-persisted-workspace-payload-w","errorCode":null,"errorMessage":"decode persisted workspace payload: %w","messagePattern":"decode persisted workspace payload: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/workspace.go","lineNumber":799,"sourceCode":"\t}\n\n\tpayloadBytes, err := json.Marshal(payload)\n\tif err != nil {\n\t\treturn dagql.PersistedObjectEncoding{}, fmt.Errorf(\"marshal persisted workspace payload: %w\", err)\n\t}\n\treturn encodePersistedObjectRawJSON(payloadBytes), nil\n}\n\nfunc (*Workspace) DecodePersistedObject(\n\tctx context.Context,\n\tdag *dagql.Server,\n\t_ uint64,\n\t_ *dagql.ResultCall,\n\tpayload json.RawMessage,\n) (dagql.Typed, error) {\n\tvar persisted persistedWorkspacePayload\n\tif err := json.Unmarshal(payload, &persisted); err != nil {\n\t\treturn nil, fmt.Errorf(\"decode persisted workspace payload: %w\", err)\n\t}\n\n\tvar rootfs dagql.ObjectResult[*Directory]\n\tif persisted.RootfsResultID != 0 {\n\t\tvar err error\n\t\trootfs, err = loadPersistedObjectResultByResultID[*Directory](ctx, dag, persisted.RootfsResultID, \"workspace rootfs\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tvar mounts dagql.ObjectResult[*Directory]\n\tif persisted.MountsResultID != 0 {\n\t\tvar err error\n\t\tmounts, err = loadPersistedObjectResultByResultID[*Directory](ctx, dag, persisted.MountsResultID, \"workspace mounts\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}","sourceCodeStart":781,"sourceCodeEnd":817,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/core/workspace.go#L781-L817","documentation":"Unmarshalling the raw JSON payload into persistedWorkspacePayload failed while rehydrating a Workspace from the cache store. This fires during cache import; the stored payload is corrupt or was written by an incompatible persistence schema version, so the cached Workspace cannot be reconstructed.","triggerScenarios":"Thrown at core/workspace.go:799 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"82ba2681dbe30d3547a1dc50ea495900ab5b6047","analyzedAt":"2026-09-05T07:21:37.930Z","contentChangedAt":"2026-09-05T07:21:37.930Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}