Commit bfe61f0
Add tracing diagnostics for JWT decode failures
Replaces silent internal-server errors with structured tracing output so
operators can diagnose decode failures without reimplementing decoding
logic themselves.
- local: downgrade per-key failures from error to debug (expected when
iterating multiple keys) and switch to key/value field syntax
- remote: add info on initialize start/completion with jwks_url; warn on
empty cache, unknown kid, and missing kid; debug on header parse and
validation failures; warn per JWKS fetch attempt with attempt number;
warn on JWK parse failure; convert existing error log to key/value style
Token content and claims are never logged; kid values and error kinds are
the only context emitted.
https://claude.ai/code/session_013A5MSE1JJcmHjt6KjAiVoT1 parent 06efdf1 commit bfe61f0
2 files changed
Lines changed: 30 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
160 | 160 | | |
| 161 | + | |
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
| |||
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
202 | | - | |
203 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
204 | 211 | | |
205 | 212 | | |
206 | 213 | | |
| |||
229 | 236 | | |
230 | 237 | | |
231 | 238 | | |
232 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
233 | 243 | | |
234 | 244 | | |
235 | 245 | | |
| |||
284 | 294 | | |
285 | 295 | | |
286 | 296 | | |
287 | | - | |
| 297 | + | |
288 | 298 | | |
289 | 299 | | |
290 | 300 | | |
291 | | - | |
292 | 301 | | |
293 | | - | |
294 | | - | |
295 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
296 | 305 | | |
297 | 306 | | |
298 | 307 | | |
| |||
309 | 318 | | |
310 | 319 | | |
311 | 320 | | |
| 321 | + | |
312 | 322 | | |
313 | 323 | | |
314 | 324 | | |
| |||
419 | 429 | | |
420 | 430 | | |
421 | 431 | | |
422 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
423 | 437 | | |
424 | 438 | | |
425 | 439 | | |
426 | 440 | | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
432 | 445 | | |
| 446 | + | |
433 | 447 | | |
434 | 448 | | |
435 | 449 | | |
| 450 | + | |
436 | 451 | | |
437 | 452 | | |
438 | 453 | | |
| |||
0 commit comments