Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
fix(all pipe): reduce schema validation error reporting (#391)
Browse files Browse the repository at this point in the history
Only report the schema validation error once in the pipeline instead of for every step

fix #92
  • Loading branch information
ramboz authored Sep 13, 2019
1 parent 3a8b400 commit c9e75f5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/defaults/html.pipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const htmlpipe = (cont, context, action) => {
const timer = timing();
pipe
.every(dump.record)
.every(validate).when(() => !production())
.every(validate).when((ctx) => !production() && !ctx.error)
.every(timer.update)
.use(resolveRef).expose('resolve').when(hascontent)
.use(fetch).expose('fetch').when(hascontent)
Expand Down
2 changes: 1 addition & 1 deletion src/defaults/json.pipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const jsonpipe = (cont, context, action) => {
const timer = timing();
pipe
.every(dump.record)
.every(validate).when(() => !production())
.every(validate).when((ctx) => !production() && !ctx.error)
.every(timer.update)
.use(fetch).expose('fetch')
.use(parse).expose('parse')
Expand Down
2 changes: 1 addition & 1 deletion src/defaults/xml.pipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const xmlpipe = (cont, context, action) => {
const timer = timing();
pipe
.every(dump.record)
.every(validate).when(() => !production())
.every(validate).when((ctx) => !production() && !ctx.error)
.every(timer.update)
.use(fetch).expose('fetch')
.use(parse).expose('parse')
Expand Down

0 comments on commit c9e75f5

Please sign in to comment.