New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Endpoint that randomly succeeds/fails based on a configuration sent in the request #299
Comments
This sounds like a great idea. |
I would like to implement this idea, if no one is already doing so. |
Hi @bugrakocabay this is all yours. :) |
Hello @ageddesi. If no one is assigned to this issue, I would love to work on it. |
Hi @0xVnay, |
Removing @0xVnay from the assignee due to inactivity |
Will be in next release |
@all-contributors please add @suppergerrie2 for code |
I've put up a pull request to add @suppergerrie2! 🎉 |
Is your feature request related to a problem? Please describe.
I'd like an endpoint that randomly succeeds or fails based on a configuration I can send in the request.
Describe the solution you'd like
There's many possible ways this could be implemented, ranging from a simple randomly failing endpoint with a randomness factor (i.e.
api/flaky?failure_rate=0.25
) to a more in depth endpoint that takes a configuration object on how it should and/or could potentially respond:In the example above, there's a 50% chance of succeeding with a
200 OK
response, a 25% chance of failing with a400 BAD REQUEST
, a 10% chance of failing with a403 FORBIDDEN
and a 15% chance of failing with a404 NOT FOUND
.Naturally the latter will require some more work.
The text was updated successfully, but these errors were encountered: