feat(http): return 401 even after successfully saved batch for JustExpired case

This commit is contained in:
Alexander 2024-11-15 11:21:18 +01:00
parent 6d5629872a
commit 03c18def0a

View file

@ -350,6 +350,10 @@ func (e *Router) pushMessagesHandlerWeb(w http.ResponseWriter, r *http.Request)
return
}
if tokenJustExpired {
e.ResponseWithError(r.Context(), w, http.StatusUnauthorized, errors.New("token expired"), startTime, r.URL.Path, bodySize)
return
}
e.ResponseOK(r.Context(), w, startTime, r.URL.Path, bodySize)
}