ctinyle 3 月之前
父節點
當前提交
d3b4f1ba75
共有 1 個文件被更改,包括 9 次插入4 次删除
  1. 9 4
      app/Http/Controllers/SourceController.php

+ 9 - 4
app/Http/Controllers/SourceController.php

@@ -30,10 +30,15 @@ class SourceController extends BaseController
30 30
             'pgsz' => 15,
31 31
             'total' => 0
32 32
         ];
33
-        $res = $client->request('GET', $url, [
34
-            'query' => $params,
35
-            'headers' => $header
36
-        ]);
33
+        try {
34
+            $res = $client->request('GET', $url, [
35
+                'query' => $params,
36
+                'headers' => $header
37
+            ]);
38
+        } catch (\Exception $e) {
39
+            dd($e);
40
+        }
41
+
37 42
         dd($res);
38 43
     }
39 44
 }