From 552b3cb682e0552c30d0e57f40782eb5457dce26 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Mon, 19 Sep 2022 16:12:21 -0500 Subject: [PATCH] Report slot errors --- pkg/beaconclient/processslot.go | 4 ++-- pkg/beaconclient/queryserver.go | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/beaconclient/processslot.go b/pkg/beaconclient/processslot.go index 4bbc942..caf0ad3 100644 --- a/pkg/beaconclient/processslot.go +++ b/pkg/beaconclient/processslot.go @@ -303,7 +303,7 @@ func (ps *ProcessSlot) getSignedBeaconBlock(serverAddress string) error { ps.SszSignedBeaconBlock = []byte{} ps.ParentBlockRoot = "" ps.Status = "skipped" - return nil + return err } var signedBeaconBlock SignedBeaconBlock @@ -314,7 +314,7 @@ func (ps *ProcessSlot) getSignedBeaconBlock(serverAddress string) error { ps.SszSignedBeaconBlock = []byte{} ps.ParentBlockRoot = "" ps.Status = "skipped" - return nil + return err } ps.FullSignedBeaconBlock = &signedBeaconBlock diff --git a/pkg/beaconclient/queryserver.go b/pkg/beaconclient/queryserver.go index 7d1478b..5c80c0b 100644 --- a/pkg/beaconclient/queryserver.go +++ b/pkg/beaconclient/queryserver.go @@ -59,6 +59,9 @@ func querySsz(endpoint string, slot string) ([]byte, int, error) { loghelper.LogSlotError(slot, err).Error("Unable to turn response into a []bytes array!") return nil, rc, fmt.Errorf("Unable to turn response into a []bytes array!: %s", err.Error()) } + if rc != 200 { + return body, rc, fmt.Errorf("HTTP Error: %d", rc) + } return body, rc, nil }