MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / noIndexError

Function noIndexError

src/ui-server/api/session.ts:101–109  ·  view source on GitHub ↗

* Guidance shown when there is no index to read. Deliberately the same three * facts the CLI prints: the viewer never creates an index, `codegraph init` * does, and you can point the viewer somewhere already indexed.

(projectRoot: string)

Source from the content-addressed store, hash-verified

99 * does, and you can point the viewer somewhere already indexed.
100 */
101function noIndexError(projectRoot: string): ApiError {
102 return new ApiError(
103 'no-index',
104 `No CodeGraph index found for ${projectRoot}.`,
105 'The viewer reads an index that already exists — it never creates one. ' +
106 'Run "codegraph init" in that project, or start the viewer against a project ' +
107 'that has one: codegraph ui /path/to/indexed/project'
108 );
109}
110
111/**
112 * Holds the project's `CodeGraph` open for the life of the server.

Callers 1

acquireMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected