{"record":{"id":"254b3790885794d8","repo":"JuliusBrussee/caveman","slug":"ccr-typed-object-get-w","errorCode":null,"errorMessage":"ccr typed object get: %w","messagePattern":"ccr typed object get: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/ccr/store_sqlite.go","lineNumber":579,"sourceCode":"\t}\n\tobj.CreatedAt = parsed\n\tif err := json.Unmarshal([]byte(deps), &obj.Dependencies); err != nil {\n\t\treturn Object{}, fmt.Errorf(\"ccr typed object dependencies decode: %w\", err)\n\t}\n\treturn obj, nil\n}\n\nconst objectColumns = `object_id, object_type, content_hash, source, created_at,\n repository_state, session_id, transform_version, currentness, lifecycle,\n dependencies_json, original_byte_length, stored_byte_length, data`\n\nfunc (s *Store) GetObject(id string) (Object, error) {\n\tobj, err := scanObject(s.db.QueryRow(`SELECT `+objectColumns+` FROM typed_objects WHERE object_id = ?`, id))\n\tif errors.Is(err, sql.ErrNoRows) {\n\t\treturn Object{}, ErrNotFound\n\t}\n\tif err != nil {\n\t\treturn Object{}, fmt.Errorf(\"ccr typed object get: %w\", err)\n\t}\n\treturn obj, nil\n}\n\nfunc (s *Store) SetObjectCurrentness(id string, currentness Currentness) error {\n\tif err := validateCurrentness(currentness); err != nil {\n\t\treturn err\n\t}\n\tresult, err := s.db.Exec(`UPDATE typed_objects SET currentness = ? WHERE object_id = ?`, currentness, id)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"ccr typed object currentness: %w\", err)\n\t}\n\tn, err := result.RowsAffected()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"ccr typed object currentness rows: %w\", err)\n\t}\n\tif n == 0 {\n\t\treturn ErrNotFound","sourceCodeStart":561,"sourceCodeEnd":597,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/engine/ccr/store_sqlite.go#L561-L597","documentation":"Store.GetObject's SELECT of a typed object by ID failed at the database layer (not ErrNoRows). The wrapped error carries the underlying SQLite failure, such as a locked or closed database.","triggerScenarios":"Thrown at engine/ccr/store_sqlite.go:579 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped error for the underlying cause","Retry after transient locks clear","Recreate the store if the table is corrupt"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"766dce6b1394ebb56a3090748d5a0240a5aefb36","analyzedAt":"2026-08-18T03:14:35.516Z","contentChangedAt":"2026-08-18T03:14:35.516Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}