Skip to content

Commit 906823e

Browse files
chore(middleware): Add logging for missing API key
1 parent b16b10b commit 906823e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

internal/middleware/auth.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package middleware
22

33
import (
44
"context"
5+
"log/slog"
56
"net/http"
67

78
"github.com/langchain-ai/langsmith-collector-proxy/internal/config"
@@ -16,6 +17,7 @@ func Auth(cfg config.Config) func(http.Handler) http.Handler {
1617
apiKey = cfg.DefaultAPIKey
1718
}
1819
if apiKey == "" {
20+
slog.Warn("missing X-API-Key", "path", r.URL.Path)
1921
http.Error(w, "missing X-API-Key", http.StatusUnauthorized)
2022
return
2123
}

0 commit comments

Comments
 (0)