@adobe/helix-html-pipeline 1.8.9 → 1.8.11

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.8.11](https://github.com/adobe/helix-html-pipeline/compare/v1.8.10...v1.8.11) (2022-11-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * use info for response status < 500 ([#194](https://github.com/adobe/helix-html-pipeline/issues/194)) ([5d8424d](https://github.com/adobe/helix-html-pipeline/commit/5d8424d40b4883993d7f3f5488680ec1924f7bd5))
7
+
8
+ ## [1.8.10](https://github.com/adobe/helix-html-pipeline/compare/v1.8.9...v1.8.10) (2022-11-11)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * log 404 as info ([#193](https://github.com/adobe/helix-html-pipeline/issues/193)) ([c642ff6](https://github.com/adobe/helix-html-pipeline/commit/c642ff6302b95a1b12fdeafc1d5d32d00c98b7d1))
14
+
1
15
  ## [1.8.9](https://github.com/adobe/helix-html-pipeline/compare/v1.8.8...v1.8.9) (2022-11-09)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-html-pipeline",
3
- "version": "1.8.9",
3
+ "version": "1.8.11",
4
4
  "description": "Helix HTML Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
package/src/html-pipe.js CHANGED
@@ -78,7 +78,8 @@ export async function htmlPipe(state, req) {
78
78
 
79
79
  if (res.error) {
80
80
  // if content loading produced an error, we're done.
81
- log.error(`error running pipeline: ${res.status} ${res.error}`);
81
+ const level = res.status >= 500 ? 'error' : 'info';
82
+ log[level](`pipeline status: ${res.status} ${res.error}`);
82
83
  res.headers.set('x-error', cleanupHeaderValue(res.error));
83
84
  if (res.status < 500) {
84
85
  await setCustomResponseHeaders(state, req, res);
@@ -119,7 +120,8 @@ export async function htmlPipe(state, req) {
119
120
  } else {
120
121
  res.status = 500;
121
122
  }
122
- log.error(`error running pipeline: ${res.status} ${res.error}`, e);
123
+ const level = res.status >= 500 ? 'error' : 'info';
124
+ log[level](`pipeline status: ${res.status} ${res.error}`, e);
123
125
  res.headers.set('x-error', cleanupHeaderValue(res.error));
124
126
 
125
127
  // turn any URL errors into a 400, since they are user input