Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Fails requests with a random selected error from file containing mocked errors.
Plugin instance definition
{
"name": "GenericRandomErrorPlugin",
"enabled": true,
"pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll",
"configSection": "genericRandomErrorPlugin",
"urlsToWatch": [
"https://api.openai.com/*"
]
}
Configuration example
{
"genericRandomErrorPlugin": {
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/genericrandomerrorplugin.schema.json",
"errorsFile": "errors.json"
}
}
Configuration properties
| Property | Description | Default |
|---|---|---|
errorsFile |
Path to the file that contains error responses. | No default |
rate |
The percentage of requests to fail with a random error. Value between 0 and 100. | 50 |
retryAfterInSeconds |
The number of seconds to wait before retrying the request. Included on the Retry-After response header for dynamic throttling. |
5 |
Command line options
| Name | Description | Default |
|---|---|---|
-f, --failure-rate <failure rate> |
The percentage of requests to fail with a random error. Value between 0 and 100. | 50 |
Next step
Cộng tác với chúng tôi trên GitHub
Bạn có thể tìm thấy nguồn cho nội dung này trên GitHub, nơi bạn cũng có thể tạo và xem lại các vấn đề và yêu cầu kéo. Để biết thêm thông tin, hãy xem hướng dẫn dành cho người đóng góp của chúng tôi.