Skip to content

Conversation

@Swizz
Copy link
Contributor

@Swizz Swizz commented May 13, 2020

Hi there,

I had a similar behavior to #19 :
by using reply.etag() the response payload seemed to be replaced by the cache payload,
when investigating, I found that a next callback in the onSend hook was given the cache payload instead of the response one.

So here is the PR that fixes #19 .

Checklist

  • run npm run test and npm run benchmark
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message and code follows Code of conduct

Copy link
Member

@jsumners jsumners left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a unit test to guard against regression on this.

@stale
Copy link

stale bot commented Oct 21, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 21, 2020
@stale stale bot closed this Nov 7, 2020
mcollina pushed a commit that referenced this pull request Mar 2, 2021
)

* next callback should use the response payload

* add test

Co-authored-by: Swizz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error when trying to use reply.etag and Redis

2 participants