Title: Some `http2` errors are not captured · Issue #28895 · nodejs/node · GitHub
Open Graph Title: Some `http2` errors are not captured · Issue #28895 · nodejs/node
X Title: Some `http2` errors are not captured · Issue #28895 · nodejs/node
Description: Version: v12.6.0 Platform: Linux solus 5.1.14-121.current #1 SMP PREEMPT Sun Jun 23 13:57:07 UTC 2019 x86_64 GNU/Linux Subsystem: http2 const http2 = require('http2'); try { const session = http2.connect('https://example.com', { settings...
Open Graph Description: Version: v12.6.0 Platform: Linux solus 5.1.14-121.current #1 SMP PREEMPT Sun Jun 23 13:57:07 UTC 2019 x86_64 GNU/Linux Subsystem: http2 const http2 = require('http2'); try { const session = http2.c...
X Description: Version: v12.6.0 Platform: Linux solus 5.1.14-121.current #1 SMP PREEMPT Sun Jun 23 13:57:07 UTC 2019 x86_64 GNU/Linux Subsystem: http2 const http2 = require('http2'); try { const session =...
Opengraph URL: https://github.com/nodejs/node/issues/28895
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Some `http2` errors are not captured","articleBody":"* **Version**: v12.6.0\r\n* **Platform**: Linux solus 5.1.14-121.current #1 SMP PREEMPT Sun Jun 23 13:57:07 UTC 2019 x86_64 GNU/Linux\r\n* **Subsystem**: http2\r\n\r\n```js\r\nconst http2 = require('http2');\r\n\r\ntry {\r\n const session = http2.connect('https://example.com', {\r\n settings: {\r\n maxFrameSize: 1\r\n }\r\n });\r\n \r\n session.on('error', error =\u003e {\r\n console.log('Captured an error.');\r\n });\r\n} catch (error) {\r\n console.log('Captured an error.');\r\n}\r\n```\r\n\r\n[See it on RunKit.](https://runkit.com/szmarczak/5d3f399f2f4891001ab1616a)\r\n\r\n### Actual behavior\r\n\r\n```\r\ninternal/http2/util.js:521\r\n throw new ERR_HTTP2_INVALID_SETTING_VALUE.RangeError(\r\n ^\r\n\r\nRangeError [ERR_HTTP2_INVALID_SETTING_VALUE]: Invalid value for setting \"maxFrameSize\": 1\r\n at ClientHttp2Session.settings (internal/http2/core.js:1156:5)\r\n at ClientHttp2Session.setupHandle (internal/http2/core.js:861:8)\r\n at Object.onceWrapper (events.js:291:20)\r\n at TLSSocket.emit (events.js:203:13)\r\n at TLSSocket.onConnectSecure (_tls_wrap.js:1346:10)\r\n at TLSSocket.emit (events.js:203:13)\r\n at TLSSocket._finishInit (_tls_wrap.js:792:8)\r\n at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:606:12) {\r\n actual: 1,\r\n min: 16384,\r\n max: 16777215\r\n}\r\n```\r\n\r\n### Expected behavior\r\n\r\n```\r\nCaptured an error.\r\n```\r\n\r\n### Possible solution\r\n\r\nIt's thrown from here:\r\n\r\nhttps://github.com/nodejs/node/blob/98d8ed64ff850a2a76685112886c22faa30e156d/lib/internal/http2/core.js#L975\r\n\r\nI think it needs to be like:\r\n\r\n```js\r\n socket.once(connectEvent, () =\u003e {\r\n try {\r\n setupFn();\r\n } catch (error) {\r\n socket.destroy(error);\r\n }\r\n });\r\n```","author":{"url":"https://github.com/szmarczak","@type":"Person","name":"szmarczak"},"datePublished":"2019-07-29T18:39:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/28895/node/issues/28895"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:361dff8e-b3a1-f5d0-b9b3-4f3b9044d26d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A7FC:3C7A3:1C4163A:26CE05E:6A4F27FD |
| html-safe-nonce | 7f572ca01ec8404b782572282f89ae590065be6352db9670d45545c17d6edf3f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBN0ZDOjNDN0EzOjFDNDE2M0E6MjZDRTA1RTo2QTRGMjdGRCIsInZpc2l0b3JfaWQiOiIxMTE2OTU2MjQwNTI3Njk3OTE3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 789d2b95799c0b004a43dd22b921cc235cce439a627e29d7d5cebe6099dc5595 |
| hovercard-subject-tag | issue:474197493 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/28895/issue_layout |
| twitter:image | https://opengraph.githubassets.com/882bbaed1d3ceccef200f39e04c1a130e03a1c4346cddfb0a32a1e77a2f97869/nodejs/node/issues/28895 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/882bbaed1d3ceccef200f39e04c1a130e03a1c4346cddfb0a32a1e77a2f97869/nodejs/node/issues/28895 |
| og:image:alt | Version: v12.6.0 Platform: Linux solus 5.1.14-121.current #1 SMP PREEMPT Sun Jun 23 13:57:07 UTC 2019 x86_64 GNU/Linux Subsystem: http2 const http2 = require('http2'); try { const session = http2.c... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | szmarczak |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b8f23afb982271f1b22258a94aede67a6b77760 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width