Skip to content

Commit 8200abd

Browse files
fix: error messages
Co-authored-by: Lisandro Corbalan <lisandro@bootnode.dev>
1 parent 5baec94 commit 8200abd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

typescript/solver/solvers/BaseFiller.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,17 +183,17 @@ export abstract class BaseFiller<
183183
if (this.metadata.customRules?.rules.length) {
184184
if (!custom) {
185185
throw new Error(
186-
"Custom rules provided but no rules were passed to the create function",
186+
"Custom rules are specified in metadata, but no corresponding rule functions were provided.",
187187
);
188188
}
189189

190190
for (let i = 0; i < this.metadata.customRules.rules.length; i++) {
191-
const rule = this.metadata.customRules?.rules[i];
191+
const rule = this.metadata.customRules.rules[i];
192192
const ruleFn = custom[rule.name];
193193

194194
if (!ruleFn) {
195195
throw new Error(
196-
`Rule ${rule.name} is not defined in the rules object`,
196+
`Custom rule "${rule.name}" is specified in metadata but is not provided in the custom rules configuration.`,
197197
);
198198
}
199199

0 commit comments

Comments
 (0)