CMS12 & Forms 5.0.1: Exceptions in IExternalSystem will crash the website process


It is not uncommon to call external systems to get datasources and the related external fields (Columns) for field mapping.

If an unhandled exception occurs in IExternalSystem.Datasources on a form that is put in as content on a page it will crash the site (process). 

To replicate:

  1. Implement working IExternalSystem and select it on a form.
  2. Put the form on a page (drag it into a contentarea)
  3. Introduce exception in the Datasources getter
  4. Watch it explode (process crash is serious and will probably make a site unresponsive, which of course is dependend on where you have put the form)

To quickfix:
Put try/catch around the logic and just return IEnumerable<IDatasource> in case of exception.

Will also sent email to support

Jan 31, 2022 14:19
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.