Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

GenericRandomErrorPlugin sends literal @dynamic in Retry-After for non-429 responses

Geschlossen
#1,905 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@waldekmastykarz arbeitet bereits daran.

Seit 04.10.2026.

  • #1909 von @waldekmastykarz — offen

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Tech-Stack
csharp
Bereich
cli, devtools

Rechercherichtung

Start in DevProxy.Plugins/Behavior/GenericRandomErrorPlugin.cs at the status-code check described in the issue, then inspect how RetryAfterPlugin is registered. Reproduce with the openai-throttling preset and confirm that dynamic Retry-After values are resolved for non-429 responses and that the resulting header is numeric.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

work in progress

Description

GenericRandomErrorPlugin only replaces @dynamic (and @dynamic=N) in the Retry-After header when the error response has status code 429. For any other status code, Dev Proxy sends the literal value @dynamic to the client.

APIs also send Retry-After on other status codes. For example, OpenAI returns 503 server_is_overloaded with Retry-After, and Anthropic returns 529 overloaded_error.

Source: DevProxy.Plugins/Behavior/GenericRandomErrorPlugin.cs, the if (error.StatusCode == (int)HttpStatusCode.TooManyRequests && ...) check.

Steps to reproduce

  1. Download the openai-throttling preset: devproxy config get openai-throttling
  2. Start Dev Proxy: devproxy --config-file "~dataFolder/configs/openai-throttling/.devproxy/devproxyrc.json" --failure-rate 100
  3. Send requests until you get a 503: curl -ikx http://127.0.0.1:8000 https://api.openai.com/v1/models

Expected behavior

HTTP/1.1 503 Service Unavailable
Retry-After: 5

Actual behavior

HTTP/1.1 503 Service Unavailable
Retry-After: @dynamic

Clients can't parse the header, so they fall back to their own backoff. RetryAfterPlugin doesn't check whether the app waited.

Affected presets

  • openai-throttling (503)
  • anthropic-random-errors (529)
  • anthropic-throttling (529)
  • api-degradation-scenarios (503)
  • webhook-delivery-resilience (503)

Proposed fix

Resolve @dynamic in the Retry-After header for any status code, and register the request with RetryAfterPlugin whenever the response has a @dynamic Retry-After header.

The other option is to keep the current behavior, show a warning when @dynamic is used on a status other than 429, and change the presets to use a number.

Vorherrschende Sprache
C#
Sterne
838
Forks
90
Ø Merge
2 T. 8 Std.
Gemergte PRs (30 T.)
67

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus dotnet/dev-proxy

Alle Issues in dotnet/dev-proxy

Ähnliche Issues

Weitere Issues zu C#

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.