From 4265ae4dae21bcf8ad63158429937e350683b699 Mon Sep 17 00:00:00 2001 From: andres-portainer <91705312+andres-portainer@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:40:17 -0300 Subject: [PATCH] feat(offlinegate): improve error message BE-11402 (#163) --- api/http/offlinegate/offlinegate.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/http/offlinegate/offlinegate.go b/api/http/offlinegate/offlinegate.go index aabe813af..fd5a3a873 100644 --- a/api/http/offlinegate/offlinegate.go +++ b/api/http/offlinegate/offlinegate.go @@ -41,8 +41,8 @@ func (o *OfflineGate) WaitingMiddleware(timeout time.Duration, next http.Handler } if !o.lock.RTryLockWithTimeout(timeout) { - log.Error().Msg("timeout waiting for the offline gate to signal") - httperror.WriteError(w, http.StatusRequestTimeout, "Timeout waiting for the offline gate to signal", http.ErrHandlerTimeout) + log.Error().Str("url", r.URL.Path).Msg("request timed out while waiting for the backup process to finish") + httperror.WriteError(w, http.StatusRequestTimeout, "Request timed out while waiting for the backup process to finish", http.ErrHandlerTimeout) return } next.ServeHTTP(w, r)