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.

Command icon 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

nsciacca created an issue. See original summary.

nsciacca’s picture

Status: Active » Needs review
fathershawn’s picture

Version: 8.x-1.x-dev » 2.x-dev

  • 15b7ce1 committed on 2.x
    Issue #3323199 by nsciacca: Form loading error 404 WSOD in D9
    
fathershawn’s picture

Status: Needs review » Fixed
fathershawn’s picture

Thanks for the recent fixes @nsciacca. Try/Catch was exactly how that code section should have been structured :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.