GuzzleHttp\Exception\ClientException 404 not found, Mailchimp 我不想让它停止搜索

问题描述

我想 foreach 所有 API 代码,但它给出了一个

GuzzleHttp\Exception\ClientException 404 not found

API 密钥与列表不匹配时出错。我希望他继续尝试,直到找到合适的然后归还


        $result = [];
        foreach ($shows as $show) {
// Show is all API KEYS
            $mailchimp = new Mailchimp($show->authorizationcode);

            $client = new \MailchimpMarketing\apiclient();
            $client->setConfig([
                'apiKey' => $mailchimp->apikey,'server' => $mailchimp->request->getExpApikey()['1'],]);
// $request->mailchimplist is the campaign id,and gives an error when it does not match with the api key
            $response = $client->campaigns->get("$request->mailchimplist");
            $result = array_merge($result,$response);
        }
        return response()->json($result,200);

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)