improve error message

This commit is contained in:
Marc Michalsky forumZFD 2021-02-12 15:34:25 +01:00
parent 6085239f69
commit 498dc9523f
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9
2 changed files with 8 additions and 4 deletions

View file

@ -96,9 +96,7 @@ function civicrm_api3_twingle_project_Create(array $params): array {
$project = new TwingleProject($params, $id);
}
} catch (Exception $e) {
return civicrm_api3_create_error(
'Could not instantiate TwingleProject: ' . $e->getMessage()
);
return civicrm_api3_create_error($e->getMessage(), $params);
}