Random server error while asking for price request

Hello all,

since last week (and maybe even before that, but we noticed it last week) we have random error 500 returned by the API when we try to get a price
The response is like that
It looks like you have not added any caching implementation. You might experience random 401 issues
{
“message”: “Server Error”
}

It seems to come from authenticator as we saw this error message in the concerned lib

we do authenticator like that

$authenticator = new Authenticator($environment, $api_client_id, $api_client_secret);

and in stuart lib we see that :
public function __construct($environment, $api_client_id, $api_client_secret, $cache = null)
{
$base_url = $environment[‘base_url’];
$this->environment = $environment;
$this->provider = new GenericProvider([
‘clientId’ => $api_client_id,
‘clientSecret’ => $api_client_secret,
‘urlAccessToken’ => $base_url . ‘/oauth/token’,
‘redirectUri’ => $base_url,
‘urlAuthorize’ => $base_url . ‘/oauth/authorize’,
‘urlResourceOwnerDetails’ => $base_url . ‘/oauth/resource’
]);
if ($cache instanceof CacheInterface) {
$this->cache = $cache;
} else {
print “\n” . ‘It looks like you have not added any caching implementation. You might experience random 401 issues’ . “\n”;
}
}

How can we fix the problem ?

Thanks

Hi @maarekantony,

Regarding implementing caching, we strongly recommend adding this to your integration. You can find some details on adding this here, it might be that adding this alone will prevent the errors you’re seeing.

That being said we wouldn’t expect you to be receiving a 500 server error relating to authentication issues. We could try to find more detail of these errors in our logs if you provide us with the IPs from which you send us requests, you could send these to us by direct message if you’d like us to investigate further.