@westbayberry/dg 1.0.1 → 1.0.2
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 +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -124,7 +124,10 @@ async function callAnalyzeBatch(packages, config) {
|
|
|
124
124
|
if (error instanceof Error && error.name === "AbortError") {
|
|
125
125
|
throw new APIError("Request timed out after 120s. Try scanning fewer packages.", 408, "");
|
|
126
126
|
}
|
|
127
|
-
|
|
127
|
+
// Node.js fetch wraps the real error in .cause
|
|
128
|
+
const cause = error instanceof Error && error.cause;
|
|
129
|
+
const detail = cause ? `: ${cause.message || cause}` : "";
|
|
130
|
+
throw new Error(`fetch failed${detail}`);
|
|
128
131
|
}
|
|
129
132
|
clearTimeout(timeoutId);
|
|
130
133
|
if (response.status === 401) {
|