Page 1 of 1

Refesh Token, Re-Login Gives Internal Error

Posted: Fri Oct 23, 2020 10:49 am
by jweber
Hey Everyone.

I'm getting a somewhat intermittent error back from the REST API when trying to refresh the AccessToken and get the updated BhRestToken and RestUrl.

Here is what I'm seeing:

I'm trying to extract data using the Bullhorn REST API, everything runs great for a while. About 30 minutes in (it's long process) I detect that the REST token needs to be refreshed, I refresh it, re-login to get a new “BhRestToken” and “RestUrl” and continue on with the data extraction.

This works great for a while, but after a few token refreshes, I eventually end up getting a “InternalError” back from the REST API. This happens after I have successfully refreshed the Access Token and when I'm attempting to log back in to get the new “BhRestToken” and “RestURL”

This is what that call looks like:

https://rest.bullhornstaffing.com/rest- ... 95120cc6df

This is the error I’m getting back from the REST API.

InternalServerError - {"errorMessage":"An internal error has occurred","errorMessageKey":"errors.internalError"}

As I mention, I don't ALWAYS get this. It works fine a few times, then all of a sudden fails.

Any ideas?

-Jef

Re: Refesh Token, Re-Login Gives Internal Error

Posted: Fri Oct 23, 2020 6:01 pm
by khenle
Hi,

Which swimlane are you on? It's recommended to use the data-center specific base URL that corresponds to the swimlane you're on, so if this doesn't match up you could try updating the URL based on this doc (http://bullhorn.github.io/Data-Center-URLs/) to see if that helps resolve the intermittent error. (https://bullhorn.github.io/rest-api-doc ... onventions)

Re: Refesh Token, Re-Login Gives Internal Error

Posted: Mon Oct 26, 2020 7:16 am
by jweber
Thanks khenele.

The extraction process is running as a WebJob within Azure. I just checked and the Azure instance running in: "UK South"

So, I'll try the following:

UK Data Center
CLS21, CLS22, CLS23
https://auth-emea.bullhornstaffing.com
https://rest-emea.bullhornstaffing.com
https://api-emea.bullhornstaffing.co

Hope this was the issue. Much appreciated.


-Jeff

Re: Refesh Token, Re-Login Gives Internal Error

Posted: Tue Nov 03, 2020 10:00 am
by jweber
I am still seeing this intermittent "Internal Server" error.

I'm attempting to extract data from our Bullhorn intances by grabbing data in chunks of 500 records. My process will run fine for hours on end, refreshing the token as needed every 1/2 hour or so, but then out of the blue I'll get the Internal Server error when making this call during the refresh token process:

https://rest.bullhornstaffing.com/rest- ... 95120cc6df

Error is this:
Response Content: {"errorMessage":"An internal error has occurred","errorMessageKey":"errors.internalError"}

Is there a way I can recover from this? Wait and try again? This is a show-stopper for us.

-Jeff

Re: Refesh Token, Re-Login Gives Internal Error

Posted: Wed Nov 11, 2020 6:37 pm
by khenle
Hi,

About how often does the intermittent Internal Server Error occur? Is this something that occurs on a daily basis when you are attempting to extract data or less frequently?

If this is happening infrequently, is it possible to put in place some logic to retry the attempt when the internal error occurs?