From 50f448217397236b406f502e03a217bcb1ce7f07 Mon Sep 17 00:00:00 2001 From: Jihyeon Gim Date: Fri, 4 Sep 2026 13:45:35 +0900 Subject: [PATCH] rdma: map RC transport errors to protocol codes Classify the rejected-argument, short-transfer, and oversized- value failures of the session server as bad requests at the route boundary, answering the closest S3-style protocol error instead of a generic internal failure. --- rdma/rcroutes/errors_linux.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rdma/rcroutes/errors_linux.go b/rdma/rcroutes/errors_linux.go index cfc0ef54..bdd7b3b6 100644 --- a/rdma/rcroutes/errors_linux.go +++ b/rdma/rcroutes/errors_linux.go @@ -40,10 +40,15 @@ func (errRouteUnavailable) Error() string { } // isRouteBadRequest reports whether err is a malformed-request -// class error from the Linux route handlers. +// class error: an invalid header value from the route handlers or +// a rejected argument, short transfer, or oversized value from +// the session server. func isRouteBadRequest(err error) bool { var bad errRouteBadRequest - return errors.As(err, &bad) + return errors.As(err, &bad) || + errors.Is(err, rcserver.ErrShort) || + errors.Is(err, rcserver.ErrTrunc) || + errors.Is(err, rcserver.ErrArg) } // isRouteNotFound reports whether err identifies an unknown or