Skip to content

Commit

Permalink
List individual errors when multiple are detected
Browse files Browse the repository at this point in the history
  • Loading branch information
rly committed Jun 22, 2024
1 parent bc62a54 commit 884769f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/electron/frontend/core/components/JSONSchemaForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ export class JSONSchemaForm extends LitElement {
if (resolvedErrors.length) {
const len = resolvedErrors.length;
if (len === 1) this.throw(resolvedErrors[0].message);
else this.throw(`${len} JSON Schema errors detected.`);
else this.throw(`${len} errors detected: ${resolvedErrors.map((e) => e.message).join(" ")}`);
}

const allErrors = flaggedInputs
Expand Down

0 comments on commit 884769f

Please sign in to comment.