From fdec317df0615f12951b69b9202e8a9bd0041d0f Mon Sep 17 00:00:00 2001 From: Shashank D <43332436+shashank68@users.noreply.github.com> Date: Wed, 16 Mar 2022 05:47:57 +0530 Subject: [PATCH] fix(config): replace hostname in error string if opted (#262) --- core/endpoint.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/endpoint.go b/core/endpoint.go index 646cc7a3..9a7c67d5 100644 --- a/core/endpoint.go +++ b/core/endpoint.go @@ -197,6 +197,9 @@ func (endpoint *Endpoint) EvaluateHealth() *Result { result.body = nil // Clean up parameters that we don't need to keep in the results if endpoint.UIConfig.HideHostname { + for errIdx, errorString := range result.Errors { + result.Errors[errIdx] = strings.ReplaceAll(errorString, result.Hostname, "host") + } result.Hostname = "" } return result