@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.
Files changed (2) hide show
  1. package/dist/index.js +4 -1
  2. 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
- throw error;
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@westbayberry/dg",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Supply chain security scanner — scan npm dependencies in any CI or terminal",
5
5
  "bin": {
6
6
  "dependency-guardian": "dist/index.js",