Add log when blocks by range request fails (#3695)

This commit is contained in:
Preston Van Loon
2019-10-02 19:52:00 -07:00
committed by Nishant Das
parent 1064f6ebaf
commit f39f4336a0

View File

@@ -39,6 +39,7 @@ func (r *RegularSync) beaconBlocksByRangeRPCHandler(ctx context.Context, msg int
// TODO(3147): Only return blocks on the chain of the head root.
blks, err := r.db.Blocks(ctx, filters.NewFilter().SetStartSlot(startSlot).SetEndSlot(endSlot))
if err != nil {
log.WithError(err).Error("Failed to retrieve blocks")
resp, err := r.generateErrorResponse(responseCodeServerError, genericError)
if err != nil {
log.WithError(err).Error("Failed to generate a response error")