Problem/Motivation
If a form does not load properly, for example if the Form Assembly url is malformed or service is temporarily interrupted, then the page throws an \UnexpectedValueException and WSOD.
Steps to reproduce
Sync forms, add one to the page however you normally would and then delete the form on the Form Assembly side, OR
manually edit the ApiMarkup class to force a malformed url during the httpClient->get call.
Proposed resolution
Gracefully fail and show an error message that the form cannot be loaded.
Issue fork formassembly-3323199
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
nsciaccaPatch for testing: https://git.drupalcode.org/project/formassembly/-/merge_requests/5.patch
Comment #4
fathershawnComment #6
fathershawnComment #7
fathershawnThanks for the recent fixes @nsciacca. Try/Catch was exactly how that code section should have been structured :)