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

Chaos Handler not working as expected

Abierto
#1,297 5 comentarios 0 reacciones 1 asignado Ver en GitHub

@koros ya está trabajando en esto.

Desde el 21/7/2023.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

Needs: Attention :wave:

Bug Report

Prerequisites

  • Can you reproduce the problem?
  • Are you running the latest version?
  • Are you reporting to the correct repository?
  • Did you perform a cursory search?

For more information, see the CONTRIBUTING guide.

Description

I am trying to throw some throttling errors for a graph client using js randomly with 429 status code. So I created Chaos handler and added it as a middleware for that graph request via middlewareOptions and checked it, To my surprise, it received the correct response and didn't try to throw the error.

Steps to Reproduce

  1. Initialise a graphClient using @microsoft/microsoft-graph-client
  2. Added chaos Handler something like this:
await graphClient.api(path).middlewareOptions([
          new ChaosHandlerOptions(
            ChaosStrategy.MANUAL,
            'Retry Error',
            429,
            100,
)]).get()
  1. So As the chaos percentage is 100%, I should be expecting all throtling exceptions, But it didn't happen.

Expected behavior:

I am expecting to throw error so that I can catch it and handle it accordingly.

Actual behavior:

It returns the response data from the API request.

Additional Context

Add any other context about the problem here..

Usage Information

Request ID - Value of the requestId field if you are receiving a Graph API error response

SDK Version - 3.0.5

  • Node (Check, if using Node version of SDK)

Node Version - 18.13.0

  • Browser (Check, if using Browser version of SDK)

Browser Name - [The name of Browser that you are using for SDK]

Version - [The version of the browser you are using]

Lenguaje dominante
TypeScript
Estrellas
833
Forks
240
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

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 microsoftgraph/msgraph-sdk-javascript

Todos los issues de microsoftgraph/msgraph-sdk-javascript

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.