add_pipeline giving error code 412

34 views
Skip to first unread message

Workhere Admin

unread,
Jun 30, 2016, 7:16:37 PM6/30/16
to CATS API
Hi all,

We've been running the CATS API to sync our companies, jobs, candidates and applications from our jobs website database into our CATSone account, and we've now got a problem with an application from one candidate (everything else is running fine).

Here's the error we get when running a standard add_pipeline call:

<pre>
Response
<?xml version="1.0" encoding="utf-8"?>
<response success="false"> <error code="412">Candidate ID invalid or not found.</error>
</response> (between brackets): [SimpleXMLElement Object
( [@attributes] => Array ( [success] => true )

[id] => 105188695 [status_id] => 3882135 [status_title] => Applied via Workhere [activity_id] => 472266166 ) ] Data sent: Array ( [candidate_id] => 116371516 [joborder_id] => 6070622 [status] => Applied via Workhere) </pre>

It says the issue is that the candidate ID is invalid or not found, but I can't see a reference to the candidate ID in this code... the candidate's ID number is 138428337. 

The main problem is that our system is set up to continue sync attempts until it gets a successful response... the thing is, despite the error, it actually IS adding the candidate to the pipeline and so this one is stuck in a loop until we can figure out why it isn't working. So far, the candidate has been added over 6,000 times to this pipeline...

Can anyone see what's wrong here? I've looked in our MySQL database and can see that the cats_id field against this candidate is the correct ID identified above... I can add this candidate to other pipelines - it's just this candidate and this pipeline in particular.

All I can think is maybe the error is being caused by the fact that the candidate is already IN the pipeline..? Even though if I force the API to add a candidate to a pipeline they are already in, it gives a successful response? Help? Please??

Aaron Baluczynski

unread,
Jul 1, 2016, 10:04:13 AM7/1/16
to CATS API
Hi, I'm a little confused. You mention candidate ID of 138428337 but in your example "data sent" the ID is 116371516. No candidate exists by that ID.

The error message that you are getting is displayed based solely on a check for the existence of the candidate record. It doesn't check the pipeline or anything else.

Aaron

Workhere Admin

unread,
Jul 6, 2016, 7:32:02 PM7/6/16
to CATS API
Hi Aaron,

Sorry, I think I may have sent the wrong error response (that's another issue we've already fixed).

When I try to add candidate 138428337 to job order 6440247 via the API, I get the following:
<response success="false">
<error code="412">An unexpected error occurred.</error>
</response>

Is there any way to figure out what is wrong with this? As I described earlier, it has now added an 'activity' over 6000 times but it never actually adds to the job order pipeline... so this error is preventing it from adding to the pipeline, but successfully logging the activity.

Aaron Baluczynski

unread,
Jul 7, 2016, 10:48:21 AM7/7/16
to CATS API
Looks like there was some bad data where the candidate was sort of "half" in the pipeline. I cleared that out. Hopefully the add_pipeline call will work now.

Aaron

Workhere Admin

unread,
Jul 10, 2016, 7:55:28 PM7/10/16
to CATS API
Hi Aaron,

Thanks very much! That appears to have done the trick! The candidate's activity has been logged correctly and they have been added to the pipeline.

Workhere Admin

unread,
Nov 7, 2016, 10:39:57 PM11/7/16
to CATS API
Hi again Aaron,

Back again as the same issue appears to be happening again with two other candidates.

The candidate IDs are 177886212 and 170339443... are you please able to take a look as you did last time? And is there anything you can see that we're doing wrong on our end to cause this?

Thanks very much,
Dion

Aaron Baluczynski

unread,
Nov 8, 2016, 5:12:44 PM11/8/16
to CATS API
Hi Dion,

I'll need the job order IDs in addition to the candidate IDs. If it is indeed the same issue, I can clear these out.

I don't think you're doing anything that would cause this.

Thanks,
Aaron

Workhere Admin

unread,
Nov 8, 2016, 7:04:46 PM11/8/16
to CATS API
Thanks Aaron,

The job order IDs seem to be...

  • 8291892 and 
8223945

Dion

Aaron Baluczynski

unread,
Nov 9, 2016, 10:19:22 AM11/9/16
to CATS API
It was the same issue, and I've cleared out the bad records. Should work now!

Workhere Admin

unread,
Nov 22, 2016, 9:34:29 PM11/22/16
to CATS API
Thank you!! :)
Reply all
Reply to author
Forward
0 new messages