Skip to content

Commit 854fed1

Browse files
authored
fix(chainsync): error on nil resp from kupo (#512)
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent 5d151f0 commit 854fed1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

input/chainsync/chainsync.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,9 @@ func getKupoClient(c *ChainSync) (*kugo.Client, error) {
578578
return nil, fmt.Errorf("failed to perform health check: %w", err)
579579
}
580580
}
581+
if resp == nil {
582+
return nil, errors.New("health check failed with nil response")
583+
}
581584
defer resp.Body.Close()
582585

583586
if resp.StatusCode != http.StatusOK {

0 commit comments

Comments
 (0)