@wrongstack/providers 0.119.1 → 0.141.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -754,8 +754,7 @@ var WireAdapter = class {
|
|
|
754
754
|
});
|
|
755
755
|
const result = await Promise.race([readPromise, timeoutPromise]);
|
|
756
756
|
if ("timedOut" in result && result.timedOut) {
|
|
757
|
-
reader.cancel("stream hang detected").catch(() => {
|
|
758
|
-
});
|
|
757
|
+
reader.cancel("stream hang detected").catch((err) => console.debug(`[wire-adapter] cancel after stream hang failed: ${err}`));
|
|
759
758
|
const elapsedMs = Date.now() - startTime;
|
|
760
759
|
throw new StreamHangError({
|
|
761
760
|
providerId,
|
|
@@ -2475,6 +2474,8 @@ function makeProvider(p, cfg) {
|
|
|
2475
2474
|
});
|
|
2476
2475
|
case "google":
|
|
2477
2476
|
return new GoogleProvider({ id: p.id, apiKey: expectDefined(apiKey), baseUrl });
|
|
2477
|
+
default:
|
|
2478
|
+
throw new Error(`Unknown provider family: ${String(family)}`);
|
|
2478
2479
|
}
|
|
2479
2480
|
}
|
|
2480
2481
|
function makeProviderFromConfig(id, cfg) {
|