Skip to content

refactor(grpc): map the no-persisted-config case to FailedPrecondition #175

Description

@Bugs5382

Follow-up from PR #174 (GetConfig) review. ConfigStore.Current returns a plain errors.New("node: Current: no config persisted yet"), which both GetConfig and SetManagement map to codes.Internal. A caller cannot distinguish "node has no config yet" (a precondition/not-ready state) from a genuine internal error.

Scope: add an exported sentinel (e.g. node.ErrNoConfig) in internal/node/providers.go, and have GetConfig + SetManagement map it to codes.FailedPrecondition. Low impact (a running linked node always has a persisted config), so this is polish, not a blocker.

Metadata

Metadata

Assignees

Labels

enhancementNew feature (feat). Minor version bump.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions