Commission Junction Error Token 503 in laravel 5.5 project

79 views Asked by At

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.

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.

1

There are 1 answers

0
ta_shuo On

Maybe it's the vendor api breaks occasionally, you can feedback to them.

503 SERVICE UNAVAILABLE