Report slot errors

This commit is contained in:
Thomas E Lackey 2022-09-19 16:12:21 -05:00
parent 4790db493b
commit 552b3cb682
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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
}