You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-2Lines changed: 19 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ If you've defined a mock response to the specific request, the proxy will serve
57
57
Depending on the configured fail ratio, the proxy will either pass the request through to Microsoft Graph or return one of the relevant network codes with a matching error response.
58
58
59
59
> **Important**
60
-
>
60
+
>
61
61
> When closing the proxy, press the Enter key in the proxy's window, so that the proxy unregisters itself from your machine. If you terminate the proxy's process, you will lose network connection. To restore your connection in such case, start the proxy again, and close it by pressing Enter.
62
62
63
63
## Configuration
@@ -311,9 +311,18 @@ Setting|Description|Command-line option|Allowed values|Default value
311
311
`port`|Port on which the proxy should listen to traffic|`-p, --port`|integer|`8000`
312
312
`failureRate`|Rate of requests to Microsoft Graph between `0` and `100` that the proxy should fail. Set to `0` to pass all requests to Microsoft Graph, and to `100` to fail all requests.|`-f, --failure-rate`|`0..100`|`50`
313
313
`noMocks`|Don't use mock responses|`--no-mocks`|`true`, `false`|`false`
314
+
`allowedErrors`|List of http status code errors the proxy may produce when failing a request|`--allowed-errors -a`|`429 500 502 503 504 507`|`429 500 502 503 504 507`
314
315
`cloud`|Which Microsoft Cloud to use for listening to requests|`-c, --cloud`|As defined in the `cloudHosts` setting|`global`
315
316
`cloudHosts`|List of Microsoft Clouds allowed for testing||Key-value pairs of name and host name, eg. `"global": "graph.microsoft.com"`|See the `appsettings.json` file
Will configure the proxy listening on port 8080 to fail 50% of requests with an http status code of either 429 or 503 and ignore any mock responses that may have been provided in the `responses.json` file
325
+
317
326
## Frequently Asked Questions
318
327
319
328
### Does Graph Chaos Proxy upload any data to Microsoft?
@@ -322,4 +331,12 @@ No, it doesn't. While the proxy intercepts all network traffic on your machine,
322
331
323
332
### I've got no internet connection after using Graph Chaos Proxy
324
333
325
-
If you terminate the Graph Chaos Proxy process, the proxy won't be able to unregister itself and you won't have network connection on your machine. To restore network connection, start the proxy and close it by pressing Enter, which will gracefully close the proxy unregistering it on your machine and restoring the regular network connection.
334
+
If you terminate the Graph Chaos Proxy process, the proxy won't be able to unregister itself and you won't have network connection on your machine. To restore network connection, start the proxy and close it by pressing Enter, which will gracefully close the proxy unregistering it on your machine and restoring the regular network connection.
335
+
336
+
### I keep getting 429 responses
337
+
338
+
If you have the failure rate at 100% then no request can ever succeed. If you configure a lower failure rate then a previously throttled request will be passed to Microsoft Graph provided the `Retry-After` time period has elapsed.
339
+
340
+
### I have a 429 response with no `Retry-After` header
341
+
342
+
As documented in the [Best practices to handle throttling](https://learn.microsoft.com/en-us/graph/throttling#best-practices-to-handle-throttling) an exponential backoff retry policy is recommended.
0 commit comments