Notă
Accesul la această pagină necesită autorizare. Puteți încerca să vă conectați sau să modificați directoarele.
Accesul la această pagină necesită autorizare. Puteți încerca să modificați directoarele.
Fails requests made to Microsoft Graph with random errors.
Plugin instance definition
{
"name": "GraphRandomErrorPlugin",
"enabled": false,
"pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll",
"configSection": "graphRandomErrorsPlugin"
}
Configuration example
{
"graphRandomErrorPlugin": {
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/graphrandomerrorplugin.schema.json",
"allowedErrors": [ 429, 500, 502, 503, 504, 507 ]
}
}
Configuration properties
| Property | Description | Default |
|---|---|---|
allowedErrors |
List of HTTP status codes that Dev Proxy might produce. | 429 500 502 503 504 507 |
rate |
The percentage of requests to fail with a random error. Value between 0 and 100. | 50 |
retryAfterInSeconds |
Value of the Retry-After header in seconds. |
5 |
Command line options
| Name | Description | Default |
|---|---|---|
-a, --allowed-errors |
List of HTTP status codes that Dev Proxy might produce. | 429 500 502 503 504 507 |
-f, --failure-rate <failure rate> |
The percentage of requests to fail with a random error. Value between 0 and 100. | 50 |
HTTP error status codes used by Microsoft Graph
Microsoft Graph uses the following HTTP status codes.
Tip
Descriptions from HTTP response status codes
| Code | Name | Description |
|---|---|---|
| 429 | Too Many Requests | Indicates the user has sent too many requests in a given amount of time ("rate limiting"). A Retry-After header might be included to this response indicating how long to wait before making a new request. |
| 500 | Internal Server Error | Indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. This error response is a generic "catch-all" response. Usually, this indicates the server can't find a better 5xx error code to response. |
| 502 | Bad Gateway | Indicates that the server, while acting as a gateway or proxy, received an invalid response from the upstream server. |
| 503 | Service Unavailable | Indicates that the server isn't ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded. This response should be used for temporary conditions and the Retry-After HTTP header should, if possible, contain the estimated time for the recovery of the service. |
| 504 | Gateway Timeout | Indicates that the server, while acting as a gateway or proxy, didn't get a response in time from the upstream server that it needed in order to complete the request. |
| 507 | Insufficient Storage | Might be given in the context of the Web Distributed Authoring and Versioning (WebDAV) protocol (see RFC 4918). It indicates that a method couldn't be performed because the server can't store the representation needed to successfully complete the request. |
Next step
Colaborați cu noi pe GitHub
Sursa pentru acest conținut poate fi găsită pe GitHub, unde puteți, de asemenea, să creați și să consultați probleme și solicitări de tragere. Pentru mai multe informații, consultați ghidul nostru pentru colaboratori.