-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add support to inject errors using headers #55
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good start 👍
Shall we add one or two examples in the README.md
?
@Lantero I added a section in the documentation in f872576500. |
README.md
Outdated
Example of header usage: | ||
|
||
``` | ||
curl -v -X POST localhost:3333/api/pizza -H "X-Error: catalog-timeout-inserting" -H "X-User-Id: 123" -d '{}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @Lantero
It would be nice if you could define the probability of this error happening.
Wdyt?
E.g., X-Error: catalog-timeout-inserting-80 or something like that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or, maybe the Envoy approach would be better if we went in this direction.
It would also let users add multiple failures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the PR to support multiple failures in 06472b58c6.
…rror header by multiple header one for each type of error
No description provided.