Enable experimental feature http2
See original GitHub issueHello,
I’ve got this error when i want to use superagent to send an API request :
superagent: Enable experimental feature http2
(node:20298) ExperimentalWarning: The http2 module is an experimental API.
(node:20298) UnhandledPromiseRejectionWarning: Error: Unauthorized
at Request.callback (/home/admin/www/imf-nodeapps/node_modules/superagent/lib/node/index.js:783:15)
at IncomingMessage.parser (/home/admin/www/imf-nodeapps/node_modules/superagent/lib/node/index.js:1015:18)
at emitNone (events.js:106:13)
at Stream.emit (events.js:208:7)
at Unzip.unzip.on (/home/admin/www/imf-nodeapps/node_modules/superagent/lib/node/unzip.js:55:12)
at emitNone (events.js:111:20)
at Unzip.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:20298) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:20298) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code
do you have any ideas what i have to do?
thanks
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Enable experimental feature http2 · Issue #1430 - GitHub
Hello, I've got this error when i want to use superagent to send an API request : superagent: Enable experimental feature http2 (node:20298) ......
Read more >adonis test returning message: "superagent: Enable ...
My testing is passing normally, but i'm receiving the message: “superagent: Enable experimental feature http2”.
Read more >HTTP/2 guide - Apache HTTP Server Version 2.5
This is the howto guide for the HTTP/2 implementation in Apache httpd. This feature is production-ready and you may expect interfaces and directives...
Read more >HTTP/2 | Node.js v19.3.0 Documentation
Used to set a callback function that is called when there is no activity on the Http2Session after msecs milliseconds. The given callback...
Read more >Introduction to HTTP/2 - web.dev
HTTP/2 (or h2) is a binary protocol that brings push, multiplexing streams and frame control to the web.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OK, I’ve checked the code:
Ignore the HTTP2 line. It’s always printed on Node 10 and later. It’s not an error, and it doesn’t mean anything.
The error is about lack of
.catch()
in your code.Your problem is only later “UnhandledPromiseRejectionWarning: Error: Unauthorized”. That means you have made HTTP request to a server, but the server returned status 403, and you’ve ignored that error by not having
.catch()
in your code.Every time you use
.then()
, you must also catchPromise
errors (i.e. have.catch()
somewhere later, or 2-argument version of.then()
, or useasync
/await
syntax instead ofthen()
).When you launch node, add
--trace-warnings
, e.g.and it will show you where you must add
.catch()
calls.It’s disabled on master