Commit bd06bab
committed
fix: address PostgREST authenticator review findings
- Hoist parsed PostgREST config outside the service type switch so the
per-node authenticator loop reuses the already-validated result instead
of re-parsing and silently discarding errors, which could cause
per-node authenticators to use a different anon role than the primary.
- Fix double `%w` in `PostgRESTAuthenticatorResource.Refresh` — replace
with `errors.Join` so both `resource.ErrNotFound` and the original
error are independently unwrappable via `errors.Is`/`errors.As`.1 parent 0c96852 commit bd06bab
2 files changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
465 | 469 | | |
466 | 470 | | |
467 | 471 | | |
| |||
489 | 493 | | |
490 | 494 | | |
491 | 495 | | |
492 | | - | |
| 496 | + | |
| 497 | + | |
493 | 498 | | |
494 | 499 | | |
495 | 500 | | |
| 501 | + | |
496 | 502 | | |
497 | 503 | | |
498 | 504 | | |
| |||
594 | 600 | | |
595 | 601 | | |
596 | 602 | | |
597 | | - | |
598 | 603 | | |
599 | 604 | | |
600 | 605 | | |
601 | 606 | | |
602 | 607 | | |
603 | 608 | | |
604 | | - | |
| 609 | + | |
605 | 610 | | |
606 | 611 | | |
607 | 612 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
100 | | - | |
| 101 | + | |
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| |||
0 commit comments