Skip to content
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

Merged
merged 5 commits into from
Jun 10, 2024

Conversation

vortegatorres
Copy link
Contributor

No description provided.

@vortegatorres vortegatorres self-assigned this May 13, 2024
Copy link

@Lantero Lantero left a 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?

@vortegatorres
Copy link
Contributor Author

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 '{}'
Copy link
Member

@dgzlopes dgzlopes May 14, 2024

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

Copy link
Member

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.

Copy link
Contributor Author

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.

@vortegatorres vortegatorres changed the title Add support to inject errors using X-Error header Add support to inject errors using headers May 22, 2024
…rror header by multiple header one for each type of error
@vortegatorres vortegatorres merged commit 62fc3e9 into main Jun 10, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants