Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-21371

An api error when calling drush cvapi should be treated as a drush error

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.28
    • Fix Version/s: 4.7.30
    • 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']);
      }

      ```

      Mathieu Lutfy Mark Hanna Jamie McClelland ping

        Attachments

          Activity

            People

            • Assignee:
              eileen Eileen McNaughton
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: