Commit 2a5a188
authored
revert(protocol/websocket): keep fixed status code 44 for handshake failure (#257)
* revert(protocol/websocket): keep fixed status code 44 for handshake failure
The 4xx fail-fast change started surfacing the upstream HTTP status code
(e.g. 401) in the ApiException status, which breaks callers that rely on
the fixed websocket failure status code 44.
Restore Constants.DASHSCOPE_WEBSOCKET_FAILED_STATUS_CODE as the reported
status code. The handshake HTTP status code is still extracted, but it is
now only used to decide whether a retry is pointless.
* fix: test case for websocket error code1 parent 2440e14 commit 2a5a188
2 files changed
Lines changed: 10 additions & 8 deletions
File tree
- src
- main/java/com/alibaba/dashscope/protocol/okhttp
- test/java/com/alibaba/dashscope
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
| 209 | + | |
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
| 232 | + | |
231 | 233 | | |
232 | 234 | | |
233 | 235 | | |
234 | 236 | | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
| 237 | + | |
239 | 238 | | |
240 | 239 | | |
241 | 240 | | |
| |||
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
334 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
335 | 337 | | |
336 | 338 | | |
337 | 339 | | |
| |||
359 | 361 | | |
360 | 362 | | |
361 | 363 | | |
362 | | - | |
| 364 | + | |
| 365 | + | |
363 | 366 | | |
364 | 367 | | |
365 | 368 | | |
| |||
0 commit comments