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

HTTP Send results in IsUndelivered true for non-2XX responses #762

Closed
sbgreene1307 opened this issue Mar 22, 2022 · 2 comments · Fixed by #764
Closed

HTTP Send results in IsUndelivered true for non-2XX responses #762

sbgreene1307 opened this issue Mar 22, 2022 · 2 comments · Fixed by #764

Comments

@sbgreene1307
Copy link

sbgreene1307 commented Mar 22, 2022

Expected Behaviour

When invoking cloudeventshttp.Send non-2XX responses should come back as a ResultNACK.

In v2/protocol/http/protocol_retry.go all non-2XX responses result in a ResultNACK which should come back as the return from Send.

Actual Behaviour

In v2/protocol/http/protocol.go the ResultNACK is lost due to creating a new http result with a new error string rather than the ResultNACK as a wrapped error.

This results in IsUndelivered being true.

@n3wscott
Copy link
Member

Would you be able to repo this with a test?

@sbgreene1307
Copy link
Author

Sure, I thought the integration test dir would be a good spot for this. I had a little trouble tying into the current implementation to trigger a different response code, if you know of how it can be done with the TapHandler I'm all ears.

This at least demonstrates the issue, I can rework anything as necessary.
#763

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 a pull request may close this issue.

2 participants