Page 1 of 1

Unknown internal server error on entity Candidate - 02419875

Posted: Tue Jan 31, 2017 3:24 pm
by annehiatt
Hello,
We are experiencing an error on Candidate when we make the call referenced at this link at line 152:
[url]view-source:http://www.whatresume.com/staging/wp-ad ... n&sync=590[/url]

The error message is on the body at line 70:

Code: Select all

      ["body"]=>
      string(239) "{
  "errorMessage" : "error persisting an entity of type: Candidate",
  "errors" : [ {
    "detailMessage" : "",
    "propertyName" : "",
    "severity" : "ERROR",
    "type" : "UNKNOWN_INTERNAL_ERROR"
  } ],
  "entityName" : "Candidate"
}"
Can you let us know what the issue is? The error started occurring on our production site in the last couple of weeks.

Thanks,
Anne

Re: Unknown internal server error on entity Candidate

Posted: Tue Jan 31, 2017 3:50 pm
by annehiatt
Also I'm seeing that a lot of developers experienced internal server errors around Jan 12, which is the date of the last successful submission in bullhorn from our website, in case that is of interest.

Anne

Re: Unknown internal server error on entity Candidate

Posted: Tue Jan 31, 2017 4:12 pm
by ColinC
Hello anneHiatt,

This is Colin with Bullhorn support. Could you please provide me with an example call you are making which returns this error so I can troubleshoot that directly?

Thank you,
Colin

Re: Unknown internal server error on entity Candidate - 02419875

Posted: Wed Feb 01, 2017 11:21 am
by annehiatt
Thanks Colin,

Here is the call:
["url"]=>
string(120) "https://rest1.bullhornstaffing.com/rest-services/[corp token]/entity/Candidate?BhRestToken=e24a7ccd-3f8c-4da5-a5a7-f2cc1ca0274b"

Re: Unknown internal server error on entity Candidate - 02419875

Posted: Wed Feb 01, 2017 6:23 pm
by ColinC
This would work if you are doing a PUT command and have information in the body to create a candidate.

What are you trying to accomplish? Is this adding a new candidate, updating an existing one, searching or opening a specific Candidate?

I can assist with all of those and I also recommend reviewing these:
http://developer.bullhorn.com/articles
http://developer.bullhorn.com/sites/def ... TAPI_0.pdf

please let me know if these don't suit your needs or if you would like me to review the call if you are not trying to PUT a new record.

Kind regards,
Colin

Re: Unknown internal server error on entity Candidate - 02419875

Posted: Thu Feb 02, 2017 2:13 pm
by pbearne
yes we are posting the candidate object we get from pausing a cv and we are getting this error

Code: Select all

  ["raw"]=>
      string(625) "HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Access-Control-Max-Age: 86400
Access-Control-Allow-Headers: Content-Type, X-Requested-With, *
Access-Control-Allow-Origin: *
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 02 Feb 2017 18:16:23 GMT
Connection: close

{
  "errorMessage" : "error persisting an entity of type: Candidate",
  "errors" : [ {
    "detailMessage" : "",
    "propertyName" : "",
    "severity" : "ERROR",
    "type" : "UNKNOWN_INTERNAL_ERROR"
  } ],
  "entityName" : "Candidate"
}" 
you can the return body in full on this URL [url]view-source:http://www.whatresume.com/staging/wp-ad ... n&sync=590[/url]

Re: Unknown internal server error on entity Candidate - 02419875

Posted: Thu Feb 02, 2017 5:58 pm
by ColinC
Hello,

I took a look at the body you supplied and there were two issues with it.

First, the address1 field was more than 40 characters (this was giving the generic error).
Second, editHistoryValue isn't a field for Candidates.

This is based around SOAP originally, but occasionally has field limits that the other doc doesn't mention:
http://developer.bullhorn.com/doc/versi ... t=address1

Please let me know if you're still having trouble.

Re: Unknown internal server error on entity Candidate - 02419875

Posted: Fri Feb 03, 2017 11:56 am
by pbearne
The point I am trying to make is why do we get invalid data back from the POST

Code: Select all

https://rest.bullhornstaffing.com/rest-services/{corpToken}
/resume/parseToCandidate?format=DOC
API call as stated in your docs

Code: Select all

http://developer.bullhorn.com/articles/candidatefromresume
Please list all fields that we need to remove / truncate that the parseToCandidate call may return so we can add code to clean the returned values and can pass to the create call PUT

Code: Select all

https://rest.bullhornstaffing.com/rest-services/{corpToken}
/entity/Candidate

Re: Unknown internal server error on entity Candidate - 02419875

Posted: Mon Feb 06, 2017 5:48 pm
by ColinC
Hi pbearne,

That entire process is gone through on this document here:
http://developer.bullhorn.com/articles/ ... fromresume

It runs through it all from beginning to end.

Kind regards,
Colin

Re: Unknown internal server error on entity Candidate - 02419875

Posted: Tue Feb 07, 2017 11:11 am
by pbearne
the example doesn't now work as POST https://rest.bullhornstaffing.com/rest- ... {corpToken}
/resume/parseToCandidate?format=DOC now/can returns data that errors if you pass it to PUT https://rest.bullhornstaffing.com/rest- ... /Candidate

ie address longer than 40 chars and an extra field "editHistoryValue"

I have added code in my plugin to clean the returned data from POST https://rest.bullhornstaffing.com/rest- ... {corpToken}
/resume/parseToCandidate?format=DOC

Paul

Re: Unknown internal server error on entity Candidate - 02419875

Posted: Tue Feb 07, 2017 12:25 pm
by ColinC
Hi Paul,

Just confirming if this is resolved or not. It sounds like the new code and information you have was able to get this taken care of but I want to make sure before I close this out.

Thank you,
Colin