You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Land returns codes.Unknown instead of InvalidArgument for an unrecognized strategy #996
SubmitQueueGateway.Land called with an unrecognized Strategy enum value (for example one sent by a newer client) is answered with gRPC Unknown instead of InvalidArgument. mapper.ProtoToLandRequest returns a plain fmt.Errorf, and gatewayStatusError passes unclassified errors through unchanged, so gRPC reports Unknown. Every other invalid-input error from Land is classified as a user error and surfaces as InvalidArgument.
Steps to Reproduce
Start the local stack (make local-submitqueue-start).
Call SubmitQueueGateway.Land with a configured queue, a valid change URI, and Strategy: mergestrategypb.Strategy(9999).
Inspect status.Code(err).
Expected Behavior
codes.InvalidArgument, consistent with the gateway's other invalid-input errors.
Actual Behavior
codes.Unknown, with the message failed to map land strategy: unknown land strategy in proto message: 9999.
Environment
Go version: go1.27.1
OS: Windows
Bazel version: 8.4.1
Additional Context
resolveLandStrategy and ProtoToLandRequest are in service/submitqueue/gateway/server/mapper/land.go. errs.NewUserError already matches controller.IsInvalidRequest in gatewayStatusError, so wrapping the mapper error is enough. I have a fix ready.
Activity