Chaos Handler not working as expected
@koros is already working on this.
Since Jul 21, 2023.
Assessment
This issue has not been assessed yet.
Description
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
- Initialise a graphClient using @microsoft/microsoft-graph-client
- Added chaos Handler something like this:
await graphClient.api(path).middlewareOptions([
new ChaosHandlerOptions(
ChaosStrategy.MANUAL,
'Retry Error',
429,
100,
)]).get()
- 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]
- Dominant language
- TypeScript
- Stars
- 833
- Forks
- 240
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoftgraph/msgraph-sdk-javascript
-
status:waiting-for-triage
Difficulty 1/5 Under an hour Newbie friendliness 62/100
-
Is anyone here? Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
microsoftgraph/msgraph-sdk-javascript#2005 · 1 reaction ·
-
Is it really correct that the Javascript version of the graph SDK doesn't offer typed requests? Openstatus:waiting-for-triage
Difficulty 5/5 Over a week Newbie friendliness 42/100
-
status:waiting-for-triage type:bug
Difficulty 3/5 1-2 days Newbie friendliness 48/100
microsoftgraph/msgraph-sdk-javascript#1999 · 2 comments · 1 reaction ·
-
status:waiting-for-triage type:bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
All issues in microsoftgraph/msgraph-sdk-javascript
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
check:passed streams:add
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100