Commit 08c3f1c
feat: return proper gRPC error codes for expected conditions (#549)
The plugin now returns a 404 status code when a requested WAL file does
not exist in the object store.
This prevents misleading log entries such as "Error while handling gRPC
request" for expected missing-file scenarios.
The `ErrEndOfWALStreamReached` now returns `OutOfRange` error.
The `ErrMissingPermissions` now returns `FailedPrecondition` error.
Signed-off-by: Leonardo Cecchi <[email protected]>
Signed-off-by: Armando Ruocco <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
Co-authored-by: Armando Ruocco <[email protected]>
Co-authored-by: Marco Nenciarini <[email protected]>1 parent 65a0d11 commit 08c3f1c
2 files changed
+27
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | | - | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
12 | 18 | | |
13 | | - | |
14 | | - | |
15 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
16 | 25 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | 30 | | |
38 | 31 | | |
39 | 32 | | |
| |||
95 | 88 | | |
96 | 89 | | |
97 | 90 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | 91 | | |
102 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
103 | 99 | | |
104 | 100 | | |
105 | 101 | | |
| |||
122 | 118 | | |
123 | 119 | | |
124 | 120 | | |
| 121 | + | |
125 | 122 | | |
126 | 123 | | |
127 | 124 | | |
| |||
350 | 347 | | |
351 | 348 | | |
352 | 349 | | |
353 | | - | |
| 350 | + | |
354 | 351 | | |
355 | 352 | | |
356 | 353 | | |
| |||
457 | 454 | | |
458 | 455 | | |
459 | 456 | | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | 457 | | |
464 | 458 | | |
465 | 459 | | |
| |||
0 commit comments