@opentermsarchive/engine 5.4.0 → 5.4.1
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/package.json
CHANGED
|
@@ -49,6 +49,10 @@ export default async function fetch(url, config) {
|
|
|
49
49
|
content,
|
|
50
50
|
};
|
|
51
51
|
} catch (error) {
|
|
52
|
+
if (error.type == 'system') { // Node-fetch wraps system-level errors (ENOTFOUND, ECONNREFUSED, ECONNRESET, etc.) with type 'system' and includes the original error code
|
|
53
|
+
throw new Error(`Network system error ${error.code} occurred when trying to fetch '${url}'`);
|
|
54
|
+
}
|
|
55
|
+
|
|
52
56
|
if (error instanceof AbortError) {
|
|
53
57
|
throw new Error(`Timed out after ${config.navigationTimeout / 1000} seconds when trying to fetch '${url}'`);
|
|
54
58
|
}
|