fix: avoid auth version hot path writes

This commit is contained in:
richjohnrambo
2026-09-14 19:04:36 +08:00
parent 02eddb6010
commit 275c9e5fcd
2 changed files with 12 additions and 1 deletions
+1
View File
@@ -7099,6 +7099,7 @@ func verifyIMCodeChallenge(wrt http.ResponseWriter, req *http.Request, tenantID
func authenticateIMHTTPBearer(wrt http.ResponseWriter, req *http.Request) (*imPrincipal, bool) {
principal, err := resolveIMHTTPBearer(req)
if err != nil {
logs.Warn.Printf("im http bearer auth failed request_id=%s method=%s path=%s err=%v", req.Header.Get("X-Request-ID"), req.Method, req.URL.Path, err)
if errors.Is(err, types.ErrUnsupported) {
writeIMError(wrt, req, http.StatusInternalServerError, 90000, imReasonInternal, "internal error", nil)
} else {