You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given I use a HttpHealthIndicator.pingCheck health indicator,
When a network error occurs for the checked url,
Then it is handled and the health check route reports "down" for the given key.
When I use a HttpHealthIndicator.responseCheck health indicator,
When a network error occurs for the checked url,
Then it is not handled, and the health check route throws a 500 internal error.
Minimum reproduction code
@Get()
@HealthCheck()check(){// There is nothing running on localhost:1234, so it will throw a "connect ECONNREFUSED ::1:1234"consthostWhichWontConnect='http://localhost:1234'returnthis.health.check([()=>this.http.pingCheck('this will report status: "down"',hostWhichWontConnect),()=>this.http.responseCheck('this will cause a 500 internal error',hostWhichWontConnect,(res)=>res.status===200),])}
Steps to reproduce
No response
Expected behavior
I'd expect a HttpHealthIndicator.responseCheck health indicator to not throw an error if it results from the checked network call being made, and instead reporting the result with status: "down".
If the error originates from the user defined response callback however, then not handling it is a reasonable behaviour.
Package version
10.1.1
NestJS version
10.2.6
Node.js version
18.18.0
In which operating systems have you tested?
macOS
Windows
Linux
Other
We've faced this issue when one service which was being checked had some network issues, which resulted in error: Client network socket disconnected before secure TLS connection was established
..and the health check route started crashing instead of reporting the culprit as down.
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Current behavior
Given I use a HttpHealthIndicator.pingCheck health indicator,
When a network error occurs for the checked url,
Then it is handled and the health check route reports "down" for the given key.
When I use a HttpHealthIndicator.responseCheck health indicator,
When a network error occurs for the checked url,
Then it is not handled, and the health check route throws a 500 internal error.
Minimum reproduction code
Steps to reproduce
No response
Expected behavior
I'd expect a HttpHealthIndicator.responseCheck health indicator to not throw an error if it results from the checked network call being made, and instead reporting the result with status: "down".
If the error originates from the user defined response callback however, then not handling it is a reasonable behaviour.
Package version
10.1.1
NestJS version
10.2.6
Node.js version
18.18.0
In which operating systems have you tested?
Other
We've faced this issue when one service which was being checked had some network issues, which resulted in error:
Client network socket disconnected before secure TLS connection was established
..and the health check route started crashing instead of reporting the culprit as down.
The text was updated successfully, but these errors were encountered: