return 400 if player without matches tries to track himself without providing a valid sharecode

This commit is contained in:
2022-02-01 00:53:56 +01:00
parent d88283664e
commit 26c5e0558c

View File

@@ -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)