From 26c5e0558c666577fd7a9623b0b056e10103024c Mon Sep 17 00:00:00 2001 From: Giovanni Harting <539@idlegandalf.com> Date: Tue, 1 Feb 2022 00:53:56 +0100 Subject: [PATCH] return 400 if player without matches tries to track himself without providing a valid sharecode --- main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.go b/main.go index 0d2457c..29bbc77 100644 --- a/main.go +++ b/main.go @@ -522,6 +522,10 @@ func postPlayerTrack(w http.ResponseWriter, r *http.Request) { log.Infof("[PPT] shareCode provided for player %s is invalid: %v", id, e) w.WriteHeader(http.StatusPreconditionFailed) return + case *ent.NotFoundError: + log.Infof("[PPT] match not found for player %+v: %+v, %+v", id, authCode, shareCode) + w.WriteHeader(http.StatusBadRequest) + return default: log.Infof("[PPT] Temporary Steam-API problem: %v", e) w.WriteHeader(http.StatusServiceUnavailable)