error handling when multiple records are found

Options

When a API call for getUser finds multiple users that match (based on email address), is appears that rather than return an error that actually says that multiple users were located, it simply response with a "not found" error as if the record doesn't exists.

For example:

method=getUser

primary_email=langford@care.org

<errorResponse xsi:schemaLocation="http://convio.com/crm/v1.0 " xmlns="http://convio.com/crm/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<code>16</code>

<message>The specified record does not exist.</message>

</errorResponse>

In actuality, there are two langford@care.org records in my convio instance, one is an admin user, the other isn't (different usernames).

the update method, however, returns a message I would expect:

email.accepts_email=false

method=update

primary_email=langford@care.org

<errorResponse xsi:schemaLocation="http://convio.com/crm/v1.0 " xmlns="http://convio.com/crm/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<code>15</code>

<message>Update failed: multiple records match input.</message>

</errorResponse>

I think its a bug that getUser should return error code 15 rather than 16 since clearly 15 is the correct response. I'd be very interested to hear the rationale from Convio as to why both these don't return error code 15 if this was intentional.

-mike

Tagged:

Comments

  • There is now an error code 8 for multiple records found by getUser. Unfortunatly it's still not listed on the API's error codes documentation.

Categories