hisco / http2-client

Transparently make http request to both http1 / http2 server.
https://www.npmjs.com/package/http2-client
MIT License
33 stars 14 forks source link

Report request errors #29

Closed pimterry closed 3 years ago

pimterry commented 4 years ago

Using the test from @stefan-guggisberg's PR (#28), this implementation adds support for reporting initial connection errors, so that the test passes.

This fixes #27 (at least for the initial connection error case - I'm not 100% sure that all possible errors after the initial connection are correctly handled, but I haven't seen any obvious issues).

Without this change, initial request errors (any connection that fails before identification is complete) crash the node process completely!

The implementation here:

coveralls commented 4 years ago

Pull Request Test Coverage Report for Build 93


Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/request.js 16 17 94.12%
<!-- Total: 16 17 94.12% -->
Totals Coverage Status
Change from base Build 83: 0.3%
Covered Lines: 350
Relevant Lines: 408

💛 - Coveralls