Skip to content

Fix "Unknown HTTP2 promise event"#2380

Merged
sindresorhus merged 1 commit intosindresorhus:mainfrom
xc2:fix-cacheable-request
Oct 9, 2024
Merged

Fix "Unknown HTTP2 promise event"#2380
sindresorhus merged 1 commit intosindresorhus:mainfrom
xc2:fix-cacheable-request

Conversation

@xc2
Copy link
Copy Markdown
Contributor

@xc2 xc2 commented Sep 27, 2024

Description

Fix issue:
// will throw "Unknown HTTP2 promise event: destroy"
await got('https://example.com', { cache:true, http2:true })
Caused by:

https://github.com/jaredwray/cacheable/blob/8429488fdc78e9b204e38f5d61b616d00f476f74/packages/cacheable-request/src/index.ts?plain=1#L188

				request_.once('destroy', requestErrorCallback);

cacheable-request add this line since 10.2.3

Checklist

  • I have read the documentation.
  • I have included a pull request description of my changes.
  • I have included some tests.
  • (excluded) If it's a new feature, I have included documentation updates in both the README and the types.

@xc2 xc2 force-pushed the fix-cacheable-request branch from 557afe3 to dd39ee2 Compare October 4, 2024 17:31
@sindresorhus sindresorhus merged commit f2f8cb2 into sindresorhus:main Oct 9, 2024
@xc2 xc2 deleted the fix-cacheable-request branch October 9, 2024 06:47
sevteen pushed a commit to sevteen/got-cjs that referenced this pull request Oct 28, 2024
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.

2 participants