kaazing / http2-cache.js

2 stars 11 forks source link

Better error handling to avoid block http2 streams from flowing #122

Closed akrambek closed 5 years ago

akrambek commented 5 years ago

For some yet to be identified reason, the response coming from RA doesn't contain the payload and the client always expects to have payload. So when the client tries to decode the missing payload it throws an error which makes the connection stream to stop flowing. There are few more cases where the client is throwing run time exception in side the http2 closures that causes the streams stop execution.

hthetiot commented 4 years ago

configuration._log.error

Will not trigger transport.on('error) while throw New Error would have. I don't think it is good to continue the XHR and only log error, instead I would have handled empty response from RA on configuration or transport itself.