File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,7 +54,10 @@ function coerceApiHost(params: {
5454 try {
5555 const url = new URL ( raw ) ;
5656 return url . origin ;
57- } catch { }
57+ } catch {
58+ // Bare hosts are retried with https:// below; malformed absolute URLs fall
59+ // back to provider defaults instead of sending requests to invalid endpoints.
60+ }
5861
5962 if ( / ^ [ a - z ] [ a - z \d + . - ] * : \/ \/ / i. test ( raw ) ) {
6063 return defaultHost ;
Original file line number Diff line number Diff line change @@ -81,7 +81,10 @@ export async function readResponseTextLimited(
8181 }
8282 try {
8383 reader . releaseLock ( ) ;
84- } catch { }
84+ } catch {
85+ // Error-body reads are diagnostic best effort; release failures must not
86+ // hide the bounded provider error text already captured.
87+ }
8588 }
8689
8790 return text ;
Original file line number Diff line number Diff line change @@ -409,7 +409,10 @@ export function streamProxy(
409409 } finally {
410410 try {
411411 reader ?. releaseLock ( ) ;
412- } catch { }
412+ } catch {
413+ // Stream handling above already pushed the terminal proxy event;
414+ // cleanup failures must not replace it with a secondary release error.
415+ }
413416 if ( options . signal ) {
414417 options . signal . removeEventListener ( "abort" , abortHandler ) ;
415418 }
Original file line number Diff line number Diff line change @@ -287,7 +287,10 @@ export async function readResponseText(
287287 }
288288 try {
289289 reader . releaseLock ( ) ;
290- } catch { }
290+ } catch {
291+ // The read/cancel path already produced the best-effort body result;
292+ // lock-release failures must not replace that outcome.
293+ }
291294 }
292295
293296 const bytes = concatBytes ( parts , bytesRead ) ;
You can’t perform that action at this time.
0 commit comments