-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
supportQuestions, discussions, and general supportQuestions, discussions, and general support
Description
Support plan
- is this issue currently blocking your project? (yes/no): no
- is this issue affecting a production system? (yes/no): yes
Context
- node version: 16.3.0
- module version with issue: 20.2.0
- last module version without issue: 19.1.1
- environment (e.g. node, browser, native): node
- used with (e.g. hapi application, another framework, standalone, ...): hapi application
- any other relevant information: Using AWS load balancer
What are you trying to achieve or the steps to reproduce?
When our AWS Load Balancer returns a HTTP 460 because the client closed the connection, the handling node application crashes with the following stack trace:
TypeError: Cannot read properties of null (reading 'statusCode')
at Request._finalize (/src/node_modules/@hapi/hapi/lib/request.js:500:31)
at Request._reply (/src/node_modules/@hapi/hapi/lib/request.js:437:18)
at Request._execute (/src/node_modules/@hapi/hapi/lib/request.js:282:14)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)This wasn't happening when we were using Hapi 19.1.1 with Node 14.
I've found some issues that appear similar:
This issue #4208, we're getting the error on the same line of code:
if (this.response.statusCode === 500 &&
Also this comment #4225 (comment) suggests premature close events were fixed as of Hapi 20.1.2, so we're wondering if there is another edge case.
What was the result you got?
Node application crashes
What result did you expect?
The server to function normally and respond to requests
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
supportQuestions, discussions, and general supportQuestions, discussions, and general support