Skip to content

Commit

Permalink
fix: throw error instead of mutating context
Browse files Browse the repository at this point in the history
  • Loading branch information
zaosoula committed Sep 1, 2022
1 parent 17ba196 commit c0bd425
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ function setupValidateWithJoi(joiSchema, joiOptions, translator, ifTest) {
method: context.method,
});
}
return formErrors || error;

throw error;
}
};
}
Expand Down

0 comments on commit c0bd425

Please sign in to comment.