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
[Serve] Preserve user-set gRPC status codes when exceptions are raised (ray-project#60482)
Fixesray-project#58851
### Changes
1. **New `gRPCStatusError` exception class** - Wraps exceptions with
user-set gRPC status codes so they flow through Ray's error handling
path.
2. **Exception wrapping in replica methods** - `handle_request`,
`handle_request_streaming`, and `handle_request_with_rejection` now wrap
exceptions with `gRPCStatusError` when the user has set a status code on
the gRPC context.
3. **Status code preservation in proxy** - `get_grpc_response_status()`
now detects `gRPCStatusError` and returns the user's intended status
code instead of `INTERNAL`.
4. **Message truncation** - Added `_truncate_message()` to limit error
details to 4KB, avoiding HTTP/2 trailer size limits.
5. **Documentation updates** - Updated the gRPC guide to document the
new behavior.
---------
Signed-off-by: abrar <abrar@anyscale.com>
0 commit comments