Details
-
Type:
Improvement
-
Status: Done/Fixed
-
Priority:
Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.28
-
Fix Version/s: 4.7.30
-
Component/s: Drupal Integration Modules
-
Labels:None
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Contributed Code
-
Verified?:No
Description
Currently drush output that it gets an error when a drush cvapi call results in an error - but it does not treat it as an error, meaning it does not bubble up.
Adding these lines to our drush will cause much more foam
```
if (!empty($result['is_error'])) {
drush_set_error('CIVICRM api error', $result['error_message']);
}
```
Nice Eileen - I just tried it out and got the drush "Error" message when the Civi API throws an error.
The best part about this change is getting an exit code of "1" when there is an error.