From 90125d01f1cf8649a2bbdaf6ecd599dc574e7439 Mon Sep 17 00:00:00 2001 From: Sam DeHaan Date: Wed, 27 Nov 2024 09:28:37 -0500 Subject: [PATCH] Address PR feedback --- internal/web/api/api.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/web/api/api.go b/internal/web/api/api.go index 28dbc91e2d..53592b744a 100644 --- a/internal/web/api/api.go +++ b/internal/web/api/api.go @@ -113,7 +113,13 @@ func getComponentHandlerRemoteCfg(host service.Host) http.HandlerFunc { return } - getComponentHandlerInternal(svc.Data().(remotecfg.Data).Host, w, r) + data := svc.Data().(remotecfg.Data) + if data.Host == nil { + http.Error(w, "remote config service startup in progress", http.StatusInternalServerError) + return + } + + getComponentHandlerInternal(data.Host, w, r) } }