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

API - provide information about foreign constraint errors without doing pre-checks

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.0.7
    • Fix Version/s: 4.1.0
    • Component/s: CiviCRM API
    • Labels:
      None

      Description

      Issue is that it's inefficient checking if 'contact_id' exists when creating a membership but if we don't do 'pre-checks' then we dont' give a useful error.

      Fix is not to do a pre-check but if it fails on 'DB Constraint violation' we know a FK field is wrong & we'll find out which one & put that in the error message. (We will be able to further gut the various check_params & format_params function now we have this in place- @ this stage only removing 1 check in membership_create)

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: