Skip to content

[BUG] 5xx upstream responses never trigger failover retry (no error emitted) #6734

Closed

Description

@Aias00
  • severity: Medium
  • files: shenyu-plugin/shenyu-plugin-httpclient/src/main/java/org/apache/shenyu/plugin/httpclient/WebClientPlugin.java:89; .../NettyHttpClientPlugin.java:89-120; .../DefaultRetryStrategy.java:105
  • description: WebClientPlugin installs .onRawStatus(httpStatus -> httpStatus >= 400, clientResponse -> Mono.empty()), so 4xx/5xx produce a completed response with no exception. Failover (RetryEnum.FAILOVER) is driven by onErrorResume; a 502/503/504 from an unhealthy-but-connected upstream emits no error, so failover never invokes — the bad status is passed straight through.
  • impact: Operators relying on retryStrategy=failover get no failover for the most common unhealthy-upstream signal (5xx).
  • suggested_fix: Optionally map configurable status codes (502/503/504) to errors before the retry strategy.
  • confidence: Low-Medium
  • related_existing: none — [BUG] divide forward https request will cause "Connection prematurely closed BEFORE response" Above 2.5.0 version #4280 is a specific HTTPS bug, not the 5xx-no-error gap.

Identified during the 2026-08-02 deep re-scan; full list in docs/scan2-2026-08-02/06-medium-tiers.md.

Activity

  1. added
    type: bug
    priority: medium
    on Aug 3, 2026
  2. github-actions commented on Aug 3, 2026

    @github-actions
    Contributor

    👋 Hello @Aias00

    A new issue has been opened by @Aias00:

    Please review when you have time. Thank you! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: http-clientpriority: mediumtype: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions