ctinyle 3 months ago
parent
commit
d3b4f1ba75
1 changed files with 9 additions and 4 deletions
  1. 9 4
      app/Http/Controllers/SourceController.php

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

@@ -30,10 +30,15 @@ class SourceController extends BaseController
30
             'pgsz' => 15,
30
             'pgsz' => 15,
31
             'total' => 0
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
         dd($res);
42
         dd($res);
38
     }
43
     }
39
 }
44
 }