-
Notifications
You must be signed in to change notification settings - Fork 0
Add structured error field to ControlResponse for CONTROL_ACTION_ERROR #14
Copy link
Copy link
Open
Labels
area/protoProto definitions, message design, or wire compatibility work.Proto definitions, message design, or wire compatibility work.good first issueSmall, well-scoped tasks for new contributors.Small, well-scoped tasks for new contributors.help wantedLooking for community contributions.Looking for community contributions.kind/featureNew functionality or enhancement request.New functionality or enhancement request.priority/lowNice-to-have or backlog item.Nice-to-have or backlog item.
Metadata
Metadata
Assignees
Labels
area/protoProto definitions, message design, or wire compatibility work.Proto definitions, message design, or wire compatibility work.good first issueSmall, well-scoped tasks for new contributors.Small, well-scoped tasks for new contributors.help wantedLooking for community contributions.Looking for community contributions.kind/featureNew functionality or enhancement request.New functionality or enhancement request.priority/lowNice-to-have or backlog item.Nice-to-have or backlog item.
Problem statement
CONTROL_ACTION_ERRORis defined as aControlActionenum value, butControlResponsehas no structured field to carry error details. Implementations must communicate error information through the untypedmetadatamap, leading to inconsistent error handling and potential information leakage (stack traces in metadata values).Proposed change
Add a
ControlErrormessage and an optional error field toControlResponse:Affected area
Compatibility / migration
Adding a new field (5) to
ControlResponseand a new message are both additive and wire-compatible. Old consumers ignore the new field. New consumers can checkerror != nilwhenaction == CONTROL_ACTION_ERROR.Additional context
Identified during architectural review. Without structured errors, each consumer invents its own metadata key convention (
error,error_message,err, etc.), making cross-component debugging harder.