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

Function readOnlyRefusal

src/ui-server/api/trails.ts:389–395  ·  view source on GitHub ↗
(reason: string | null)

Source from the content-addressed store, hash-verified

387}
388
389function readOnlyRefusal(reason: string | null): ApiError {
390 return new ApiError(
391 'refused',
392 reason ?? 'This viewer is running read-only, so trails cannot be saved.',
393 `Restart without --read-only to let the viewer write trails into ${TRAILS_RELATIVE_DIR}.`
394 );
395}
396
397function parseSaveRequest(body: unknown): { name: string; note: string; hops: SaveTrailRequest['hops'] } {
398 if (typeof body !== 'object' || body === null || Array.isArray(body)) {

Callers 2

saveTrailFunction · 0.85
removeTrailFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected