diff options
author | pg9182 <96569817+pg9182@users.noreply.github.com> | 2023-06-17 19:50:51 -0400 |
---|---|---|
committer | pg9182 <96569817+pg9182@users.noreply.github.com> | 2023-06-17 19:50:51 -0400 |
commit | 65fbc1fc3259bacd58d7301cc162ca3efe58897a (patch) | |
tree | 13cf0442b7c9d1835d9ccfe97a0238f7e9a4d73c /pkg/api | |
parent | 6c4c55369862c69bff64c0cb5f937e458c5e9266 (diff) | |
download | Atlas-65fbc1fc3259bacd58d7301cc162ca3efe58897a.tar.gz Atlas-65fbc1fc3259bacd58d7301cc162ca3efe58897a.zip |
pkg/api/api0: Include address in server upsert verification error
Diffstat (limited to 'pkg/api')
-rw-r--r-- | pkg/api/api0/server.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/api/api0/server.go b/pkg/api/api0/server.go index c7f4f46..98e2804 100644 --- a/pkg/api/api0/server.go +++ b/pkg/api/api0/server.go @@ -386,7 +386,7 @@ func (h *Handler) handleServerUpsert(w http.ResponseWriter, r *http.Request) { h.m().server_upsert_requests_total.reject_verify_autherr(action).Inc() } h.m().server_upsert_verify_time_seconds.failure.UpdateDuration(verifyStart) - respFail(w, r, http.StatusBadGateway, code.MessageObjf("failed to connect to auth port: %v", err)) + respFail(w, r, http.StatusBadGateway, code.MessageObjf("failed to connect to auth port (addr %s): %v", nsrv.AuthAddr(), err)) return } } @@ -396,10 +396,10 @@ func (h *Handler) handleServerUpsert(w http.ResponseWriter, r *http.Request) { switch { case errors.Is(err, context.DeadlineExceeded): h.m().server_upsert_requests_total.reject_verify_udptimeout(action).Inc() - obj = ErrorCode_NO_GAMESERVER_RESPONSE.MessageObjf("failed to connect to game port") + obj = ErrorCode_NO_GAMESERVER_RESPONSE.MessageObjf("failed to connect to game port (addr %s)", nsrv.Addr) default: h.m().server_upsert_requests_total.reject_verify_udperr(action).Inc() - obj = ErrorCode_INTERNAL_SERVER_ERROR.MessageObjf("failed to connect to game port: %v", err) + obj = ErrorCode_INTERNAL_SERVER_ERROR.MessageObjf("failed to connect to game port (addr %s): %v", nsrv.Addr, err) } h.m().server_upsert_verify_time_seconds.failure.UpdateDuration(verifyStart) respFail(w, r, http.StatusBadGateway, obj) @@ -410,7 +410,7 @@ func (h *Handler) handleServerUpsert(w http.ResponseWriter, r *http.Request) { if !h.ServerList.VerifyServer(nsrv.ID) { h.m().server_upsert_requests_total.reject_verify_udptimeout(action).Inc() - respFail(w, r, http.StatusBadGateway, ErrorCode_NO_GAMESERVER_RESPONSE.MessageObjf("verification timed out")) + respFail(w, r, http.StatusBadGateway, ErrorCode_NO_GAMESERVER_RESPONSE.MessageObjf("verification timed out (addr %s)", nsrv.Addr)) return } |