Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Cerrado
#1,905 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@waldekmastykarz ya está trabajando en esto.

Desde el 4/10/2026.

  • #1909 de @waldekmastykarz — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
csharp
Área
cli, devtools

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
C#
Estrellas
833
Forks
90
Merge medio
18 h 41 min
PR fusionados (30 d)
45

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de dotnet/dev-proxy

Todos los issues de dotnet/dev-proxy

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.