There was an error while loading. Please reload this page.
1 parent 4e3325d commit 7adcc6cCopy full SHA for 7adcc6c
1 file changed
src/lucaValidator.ts
@@ -61,11 +61,9 @@ addFormats(lucaValidator);
61
// Validate and add schemas
62
Object.entries(schemas).forEach(([key, schema]) => {
63
if (!lucaValidator.validateSchema(schema as AnySchema)) {
64
- console.error(`Invalid schema: ${key}`);
65
- console.error(lucaValidator.errors);
66
- } else {
67
- lucaValidator.addSchema(schema as AnySchema, key);
+ throw new Error(`Invalid schema: ${key}`);
68
}
+ lucaValidator.addSchema(schema as AnySchema, key);
69
});
70
71
export default lucaValidator as LucaValidator;
0 commit comments