My Laeravel (5.5) site is currently in production and everything is fine but expected to one function. In this site we use various api s from different vendors and we do use their products in our site. The thing is there is a function to add other vendors products. The problem occures at that point when our admin try to add a product it gives below error.
This is the code that affect to the above error. We haven't change anything for last few weeks in this site.
$body = curl_exec($ch);
$errno = curl_errno($ch);
if ($errno !== 0) {
throw new Exception(sprintf("Error connecting to CommissionJunction Token : [%s] %s", $errno, curl_error($ch)), $errno);
}
$http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($http_status >= 400) {
throw new Exception(sprintf("CommissionJunction Error Token [%s] %s", $http_status, strip_tags($body)), $http_status);
}
return json_decode($body);
}
I have cleared all the cached via below code
After clearing caches it worked as previous for few minutes and now its happening again. Clearing cache doesn't work any more.
So could anyone please help me on this.
Maybe it's the vendor api breaks occasionally, you can feedback to them.
503 SERVICE UNAVAILABLE