Commit 52769da
DSC-2868 fix(health): parse fetch Response body in healthCheck endpoint
The healthCheck function was migrated from axios to native fetch but
the .then() handler still sends the raw Response object instead of
the parsed body. Express serializes the opaque Response as {}.
Fix: call response.json() to extract the body before sending.
Also add null-safe error handling for network errors where
error.response is undefined.
Ref: DEV-2280
(cherry picked from commit 10fc4b0b7dc0e6f4456a78177382e94d63d39d7c)1 parent 6abcc93 commit 52769da
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
722 | | - | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
723 | 725 | | |
724 | 726 | | |
725 | | - | |
| 727 | + | |
726 | 728 | | |
727 | 729 | | |
728 | 730 | | |
| |||
0 commit comments