Repository navigation
fix(relay): preserve upstream HTTP error statuses - #1316
afourniernv wants to merge 1 commit into
Conversation
Signed-off-by: Alex Fournier <afournier@nvidia.com>
|
No actionable comments were generated in the recent review. WalkthroughThe plugin dependency and minimum Relay version move to 0.10.1. Route execution errors use Relay’s HTTP-error formatter when an upstream status is available, with a generic message as fallback. Tests cover selected statuses and provider-body privacy. ChangesNeMo Relay compatibility
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk:
|
|
What
Keep the upstream HTTP status when a managed Switchyard route fails through Relay. Use Relay's existing HTTP-error helper and keep the generic error message so provider error bodies stay private.
The 0.10.1 patch bump is needed for this fix: it adds the SDK's
http_error_message(...)helper and the host-side handling for those errors. The minimum host version is raised because 0.10.0 would still return generic errors. Both versions use native ABI 7; there is no ABI change.Why
Fixes SWITCH-1951.
Upstream 401, 429 and 503 responses currently become HTTP 400 through the plugin. Callers lose the distinction between authentication errors, rate limits and temporary failures.
The earlier fix in #1027 landed on
release/0.3, but not on main.Notes for reviewers
The code change is in
SwitchyardRuntime::execute. It uses the status already available in the safe error summary. Errors without an HTTP status keep the existing generic message. No new public APIs or changes to libsy or the codecs.This fixes buffered response statuses. Once Relay has sent HTTP 200 for a stream, later failures cannot change that status.
Validation:
Summary by CodeRabbit