feat(http): return 401 even after successfully saved batch for JustExpired case
This commit is contained in:
parent
6d5629872a
commit
03c18def0a
1 changed files with 4 additions and 0 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue