Merge pull request #19067 from eileenmcnaughton/weight
[civicrm-core.git] / CRM / Core / IDS.php
index 7a3eded15af81fff272faf5805dc74788c901ba5..59e48c24a6f082105011306f71f4bca5f22a4478 100644 (file)
@@ -47,7 +47,7 @@ class CRM_Core_IDS {
     }
 
     // lets bypass a few civicrm urls from this check
-    $skip = ['civicrm/admin/setting/updateConfigBackend', 'civicrm/admin/messageTemplates'];
+    $skip = ['civicrm/admin/setting/updateConfigBackend', 'civicrm/admin/messageTemplates', 'civicrm/ajax/api4'];
     CRM_Utils_Hook::idsException($skip);
     $this->path = $route['path'];
     if (in_array($this->path, $skip)) {
@@ -292,7 +292,7 @@ class CRM_Core_IDS {
       );
       CRM_Utils_JSON::output($error);
     }
-    CRM_Core_Error::fatal($msg);
+    throw new CRM_Core_Exception($msg);
   }
 
 }