Commit 3e1fbb2
Extract HTTP error message constants in authz server
- Add constants for common HTTP error messages (unauthorized, internal error, forbidden)
- Replace hardcoded HTTP error strings with named constants for consistency
- Improve maintainability and reduce string duplication across handlers
- Address goconst linter warnings for repeated error responses
Error constants added:
- errUnauthorized: for 401 responses
- errInternalError: for 500 responses
- errForbidden: for 403 responses
This ensures consistent error messaging across all HTTP handlers and
makes error response changes easier to maintain.
Co-authored-by: Amp <[email protected]>
Amp-Thread-ID: https://ampcode.com/threads/T-5be4213f-26eb-400c-bb7b-d4c79b7ee6fe1 parent 5a135af commit 3e1fbb2
1 file changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
| |||
312 | 315 | | |
313 | 316 | | |
314 | 317 | | |
315 | | - | |
| 318 | + | |
316 | 319 | | |
317 | 320 | | |
318 | 321 | | |
319 | 322 | | |
320 | 323 | | |
321 | 324 | | |
322 | | - | |
| 325 | + | |
323 | 326 | | |
324 | 327 | | |
325 | 328 | | |
| |||
356 | 359 | | |
357 | 360 | | |
358 | 361 | | |
359 | | - | |
| 362 | + | |
360 | 363 | | |
361 | 364 | | |
362 | 365 | | |
363 | 366 | | |
364 | 367 | | |
365 | 368 | | |
366 | | - | |
| 369 | + | |
367 | 370 | | |
368 | 371 | | |
369 | 372 | | |
| |||
390 | 393 | | |
391 | 394 | | |
392 | 395 | | |
393 | | - | |
| 396 | + | |
394 | 397 | | |
395 | 398 | | |
396 | 399 | | |
| |||
0 commit comments