From 403baf3d82cb7b69b6273c25ee20261bec3ad270 Mon Sep 17 00:00:00 2001 From: Brendan Bond Date: Thu, 21 Dec 2023 13:45:56 -0600 Subject: [PATCH] add catch block to subform submission loading (#5425) --- src/components/form/Form.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/form/Form.js b/src/components/form/Form.js index 0cd98e4fda..15b4a15210 100644 --- a/src/components/form/Form.js +++ b/src/components/form/Form.js @@ -689,7 +689,9 @@ export default class FormComponent extends Component { const formId = submission.form || this.formObj.form || this.component.form; const submissionUrl = `${this.subForm.formio.formsUrl}/${formId}/submission/${submission._id}`; this.subForm.setUrl(submissionUrl, this.options); - this.subForm.loadSubmission(); + this.subForm.loadSubmission().catch((err) => { + console.error(`Unable to load subform submission ${submission._id}:`, err); + }); } else { this.subForm.setValue(submission, flags);