API not returning a constituent record?

Options

I'm using the constituent API to do some checking for existence of email address and usernames.

This has mostly been working really well:

http://community.sierraclub.org/join/climatecrossroads.aspx

Try entering my email address adrian.cotter@sierraclub.org for instance and the page will tell you that the email address is already in use.

However, this does not work in at least one case, with one of my coworkers scott.elkins@sierraclub.org

This email address is definitely in our constituent database, and I have verified this. (If you go to our regular registration form and try to use the email address, that will tell you that the email is in use.

https://secure2.convio.net/sierra/site/ConsProfileUser )

But the API returns a result that the email does not exist (using firebug, I can see that the result returned is the same as that of an email that I know is definitely NOT in the database).

Why is the API giving the wrong result? Is there something particular to the record? Or is there something else I can do?

Tagged:

Comments

  • So Dave Hart identified the reason for this error at the summit, and will be creating a fix (Dave if you reply to this post, I'll give you the answer points

    The problem was that if an email address appeared twice in Consituent360, the error returned was the same as if no email was found. I think he will be changing it such that the API GetUser method will return all users found.

    Does this make sense for people? It works fine for me in this instance, but having a separate error would also work, if there was a good reason that the method should NOT return all the duplicate users.

  • Adrian Cotter:

    So Dave Hart identified the reason for this error at the summit, and will be creating a fix (Dave if you reply to this post, I'll give you the answer points

    The problem was that if an email address appeared twice in Consituent360, the error returned was the same as if no email was found. I think he will be changing it such that the API GetUser method will return all users found.

    Does this make sense for people? It works fine for me in this instance, but having a separate error would also work, if there was a good reason that the method should NOT return all the duplicate users.

    I just finished testing the fix. I decided to go with a distinct error message rather than returning multiple users. That solution was more compatible with the semantics of the method as they were originally defined. The new behavior will be that the getUser method will return an HTTP status code of 403 with an error code of 8 and the message "Multiple users matched the criteria specified".

    I need to coordinate with the engineering team on when the fix can go out.

Categories