From 1100bded922bed2dec1ae9010a5fcc521be3dc75 Mon Sep 17 00:00:00 2001 From: Arunesh Dwivedi Date: Thu, 20 Aug 2026 06:35:00 +0000 Subject: [PATCH] fix(api): add missing return statements after RespondError in handleGetHeader Two error paths in handleGetHeader called RespondError without returning, allowing execution to continue with potentially nil values and cause a panic or incorrect response. Signed-off-by: Arunesh Dwivedi --- services/api/service.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/api/service.go b/services/api/service.go index 95f00583..ab45699d 100644 --- a/services/api/service.go +++ b/services/api/service.go @@ -1411,11 +1411,13 @@ func (api *RelayAPI) handleGetHeader(w http.ResponseWriter, req *http.Request) { if err != nil { log.WithError(err).Info("could not get bid value") api.RespondError(w, http.StatusBadRequest, err.Error()) + return } blockHash, err := bid.BlockHash() if err != nil { log.WithError(err).Info("could not get bid block hash") api.RespondError(w, http.StatusBadRequest, err.Error()) + return } // Error on bid without value