Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIO-7637: add catch block to subform submission loading #5425

Merged
merged 2 commits into from
Dec 21, 2023
Merged

Conversation

brendanbond
Copy link
Contributor

@brendanbond brendanbond commented Dec 6, 2023

Link to Jira Ticket

https://formio.atlassian.net/browse/FIO-7637

Description

A customer had an urgent production issue - their servers were crashing with unhandled promise exceptions. Upon investigation, the server-side formio.js renderer is attempting to load subform submissions from a baseUrl that is not set, ending in a "Invalid Alias" error. Since Formio.request rejects on 4xx responses, the server will crash because NodeJS expects you to handle uncaught Promise exceptions.

An alternative might have been to examine why Formio.request rejects on 4xx responses rather than delegating handling non network errors to the caller (a lá the fetch web api), but due to the urgency of this ticket for the customer in question and the potential disruption of a change to Formio.request, this seems like the most suitable solution for the moment.

Dependencies

n/a

How has this PR been tested?

n/a

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • My changes include tests that prove my fix is effective (or that my feature works as intended)
  • New and existing unit/integration tests pass locally with my changes
  • Any dependent changes have corresponding PRs that are listed above

@travist
Copy link
Member

travist commented Dec 21, 2023

👍

@lane-formio lane-formio changed the title add catch block to subform submission loading FIO-7637: add catch block to subform submission loading Dec 21, 2023
@lane-formio lane-formio merged commit 403baf3 into master Dec 21, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants