@opentermsarchive/engine 5.6.0 → 5.6.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentermsarchive/engine",
3
- "version": "5.6.0",
3
+ "version": "5.6.1",
4
4
  "description": "Tracks and makes visible changes to the terms of online services",
5
5
  "homepage": "https://opentermsarchive.org",
6
6
  "bugs": {
@@ -48,15 +48,11 @@ export default async function fetch({
48
48
  executeClientScripts,
49
49
  };
50
50
 
51
- try {
52
- if (executeClientScripts) {
53
- return await fetchWithFullDom(url, cssSelectors, fetcherConfig);
54
- }
55
-
56
- return await fetchWithFallback(url, cssSelectors, fetcherConfig);
57
- } catch (error) {
58
- throw new FetchDocumentError(error.message);
51
+ if (executeClientScripts) {
52
+ return fetchWithFullDom(url, cssSelectors, fetcherConfig);
59
53
  }
54
+
55
+ return fetchWithFallback(url, cssSelectors, fetcherConfig);
60
56
  }
61
57
 
62
58
  async function fetchWithFallback(url, cssSelectors, fetcherConfig) {
@@ -17,8 +17,8 @@ const ERROR_MESSAGE_TO_ISSUE_LABEL_MAP = {
17
17
  'HTTP code 502': '502',
18
18
  'HTTP code 503': '503',
19
19
  'Timed out after': 'timeout',
20
- 'getaddrinfo EAI_AGAIN': 'EAI_AGAIN',
21
- 'getaddrinfo ENOTFOUND': 'ENOTFOUND',
20
+ EAI_AGAIN: 'EAI_AGAIN',
21
+ ENOTFOUND: 'ENOTFOUND',
22
22
  'Response is empty': 'empty response',
23
23
  'unable to verify the first certificate': 'first certificate',
24
24
  'certificate has expired': 'certificate expired',