@adobe/helix-html-pipeline 1.1.1 → 1.1.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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/html-pipe.js +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.1.2](https://github.com/adobe/helix-html-pipeline/compare/v1.1.1...v1.1.2) (2022-03-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* handling invalid input url with 400 ([#16](https://github.com/adobe/helix-html-pipeline/issues/16)) ([4491691](https://github.com/adobe/helix-html-pipeline/commit/449169107cc1d6a3b7b5fd211b39174d59fb2a8e)), closes [#15](https://github.com/adobe/helix-html-pipeline/issues/15)
|
|
7
|
+
|
|
1
8
|
## [1.1.1](https://github.com/adobe/helix-html-pipeline/compare/v1.1.0...v1.1.1) (2022-03-10)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/html-pipe.js
CHANGED
|
@@ -110,6 +110,13 @@ export async function htmlPipe(state, req) {
|
|
|
110
110
|
}
|
|
111
111
|
log.error(`error running pipeline: ${res.status} ${res.error}`, e);
|
|
112
112
|
res.headers.set('x-error', cleanupHeaderValue(res.error));
|
|
113
|
+
|
|
114
|
+
// turn any URL errors into a 400, since they are user input
|
|
115
|
+
// see https://github.com/adobe/helix-pipeline-service/issues/346
|
|
116
|
+
if (e.code === 'ERR_INVALID_URL') {
|
|
117
|
+
res.status = 400;
|
|
118
|
+
res.headers.set('x-error', cleanupHeaderValue(`invalid url: ${e.input}`));
|
|
119
|
+
}
|
|
113
120
|
}
|
|
114
121
|
|
|
115
122
|
return res;
|