diff --git a/web/src/elements/forms/Form.ts b/web/src/elements/forms/Form.ts index fd12a6785..6a7c84282 100644 --- a/web/src/elements/forms/Form.ts +++ b/web/src/elements/forms/Form.ts @@ -59,8 +59,11 @@ export class Form extends LitElement { return ex.json(); } return ex; - }).then((errorMessage: ErrorResponse) => { + }).then((errorMessage: ErrorResponse | Error) => { if (!errorMessage) return errorMessage; + if (errorMessage instanceof Error) { + throw errorMessage; + } const elements: PaperInputElement[] = ironForm._getSubmittableElements(); elements.forEach((element) => { const elementName = element.name;