Commit 7cf9410
refactor: move negative retry interval check to getRetryAfter method
Move the negative value handling from retryRequest to getRetryAfter method
as suggested in code review. This ensures getRetryAfter never returns a
negative value, making the API more robust.
- Move check from retryRequest to getRetryAfter
- Update test to verify getRetryAfter returns 1-10ms instead of -1
- Maintain same behavior: random delay between 1-10ms for negative values
Co-authored-by: baywet <[email protected]>1 parent f79bc62 commit 7cf9410
File tree
2 files changed
+12
-8
lines changed- components/http/okHttp/src
- main/java/com/microsoft/kiota/http/middleware
- test/java/com/microsoft/kiota/http/middleware
2 files changed
+12
-8
lines changedLines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | 113 | | |
118 | 114 | | |
119 | 115 | | |
| |||
142 | 138 | | |
143 | 139 | | |
144 | 140 | | |
145 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
146 | 148 | | |
147 | 149 | | |
148 | 150 | | |
| |||
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
| |||
0 commit comments