ctinyle 3 mēneši atpakaļ
vecāks
revīzija
d3b4f1ba75
1 mainītis faili ar 9 papildinājumiem un 4 dzēšanām
  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
 }