From 43fc3f3882528738974f9078295dd62ec0cc983d Mon Sep 17 00:00:00 2001 From: Chris Burgess Date: Thu, 15 Dec 2016 16:29:22 +1300 Subject: [PATCH] Improve error message for "possibly mandatory" exception. CRM-19772 --- api/v3/utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v3/utils.php b/api/v3/utils.php index fe194a921f..ddf19f85ea 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -1637,7 +1637,7 @@ function _civicrm_api3_validate_foreign_keys($entity, $action, &$params, $fields _civicrm_api3_validate_constraint($params[$fieldName], $fieldName, $fieldInfo); } elseif (!empty($fieldInfo['required'])) { - throw new Exception("DB Constraint Violation - possibly $fieldName should possibly be marked as mandatory for this API. If so, please raise a bug report."); + throw new Exception("DB Constraint Violation - $fieldName should possibly be marked as mandatory for $entity,$action API. If so, please raise a bug report."); } } if (!empty($fieldInfo['api.unique'])) { -- 2.25.1