Skip to content

Commit 174a260

Browse files
Preserve failure nf status set by recordFinalError in buildZuulHttpResponse (#2131)
When origin.recordFinalError() sets a specific failure StatusCategory (e.g. from an origin subclass override), the subsequent unconditional setStatusCategory call was overwriting it with the generic status derived from the response code. This PR switches to use storeStatusCategoryIfNotAlreadyFailure so that a failure status set by recordFinalError is not overwritten. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f3cff57 commit 174a260

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ private HttpResponseMessage buildZuulHttpResponse(
910910
// Collect some info about the received response.
911911
origin.recordFinalResponse(zuulResponse);
912912
origin.recordFinalError(zuulRequest, ex);
913-
StatusCategoryUtils.setStatusCategory(zuulCtx, statusCategory);
913+
StatusCategoryUtils.storeStatusCategoryIfNotAlreadyFailure(zuulCtx, statusCategory);
914914
zuulCtx.setError(ex);
915915
zuulCtx.put("origin_http_status", Integer.toString(respStatus));
916916

0 commit comments

Comments
 (0)