{"record":{"id":"af8cedb8469d13ab","repo":"weaviate/weaviate","slug":"load-concept-q","errorCode":null,"errorMessage":"load concept %q","messagePattern":"load concept %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/text2vec-contextionary/extensions/usecase.go","lineNumber":44,"sourceCode":"func NewUseCase(storage moduletools.Storage) *UseCase {\n\treturn &UseCase{\n\t\tstorage: storage,\n\t}\n}\n\nfunc (uc *UseCase) Store(concept string, value []byte) error {\n\terr := uc.storage.Put([]byte(concept), value)\n\tif err != nil {\n\t\treturn errors.Wrapf(err, \"store concept %q\", concept)\n\t}\n\n\treturn nil\n}\n\nfunc (uc *UseCase) Load(concept string) ([]byte, error) {\n\tval, err := uc.storage.Get([]byte(concept))\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"load concept %q\", concept)\n\t}\n\n\treturn val, nil\n}\n\nfunc (uc *UseCase) LoadAll() ([]byte, error) {\n\tbuf := bytes.NewBuffer(nil)\n\terr := uc.storage.Scan(func(k, v []byte) (bool, error) {\n\t\t_, err := buf.Write(v)\n\t\tif err != nil {\n\t\t\treturn false, errors.Wrapf(err, \"write concept %q\", string(k))\n\t\t}\n\n\t\t_, err = buf.Write([]byte(\"\\n\"))\n\t\tif err != nil {\n\t\t\treturn false, errors.Wrap(err, \"write newline separator\")\n\t\t}\n","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/modules/text2vec-contextionary/extensions/usecase.go#L26-L62","documentation":"This error wraps a failure from the extensions key-value storage's Get call when the text2vec-contextionary module tries to load a single stored concept (extension) by key. It is thrown by the module's UseCase.Load, which reads the concept bytes from the configured extension storage provider. The original storage error (I/O, bucket not found, etc.) is preserved via errors.Wrapf with the concept name included.","triggerScenarios":"Calling uc.Load(concept) when the underlying storage bucket is unavailable/corrupted, the storage provider fails on Get (disk I/O error, closed store), or the concept key cannot be read from the extensions bucket.","commonSituations":"Disk or state directory issues after a crash while extensions storage is being read; corrupted or manually edited extension files; requesting Load during module shutdown when the store is already closed.","solutions":["Check the wrapped root cause error for the real storage failure (disk, permissions, closed bucket)","Verify the Weaviate data directory (where extensions persist) is readable and not corrupted","Restart Weaviate to reopen the extensions storage cleanly","If extensions storage is persistently corrupted, restore from backup or clear and re-create the stored extensions"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Go: no pre-call validation available for storage health; verify store opened earlier\nif uc.storage == nil {\n    return fmt.Errorf(\"extensions storage not initialized\")\n}","typeGuard":null,"tryCatchPattern":"val, err := uc.Load(concept)\nif err != nil {\n    var root error\n    errors.As(err, &root)\n    logger.Warnf(\"concept load failed: %v\", err) // handle root storage cause\n}","preventionTips":["Ensure storage is opened before calling Load","Monitor disk health and permissions on the data directory","Log the full wrapped error chain to find the root cause"],"tags":["go","storage","contextionary","extensions"],"backgroundTag":"storage-read-failure","analyzedSha":"75aa4b6d11f8818305aafd4440b4e32794f7ca04","analyzedAt":"2026-09-04T14:58:20.392Z","contentChangedAt":"2026-09-04T14:58:20.392Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}