ray.serve.exceptions.gRPCStatusError#

exception ray.serve.exceptions.gRPCStatusError(original_exception: BaseException, code: grpc.StatusCode | None = None, details: str | None = None)[source]#

Internal exception that wraps an exception with user-set gRPC status code.

This is used to preserve user-set gRPC status codes when exceptions are raised in deployments. When a user sets a status code on the gRPC context before raising an exception, this wrapper carries that status code through the error handling path so the proxy can return the user’s intended status code instead of INTERNAL.