Skip to content

Commit cdeeeb0

Browse files
authored
Merge pull request #4 from matheusmmo/master
Update Worker.php
2 parents 86a7586 + b01db54 commit cdeeeb0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Core/Worker.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ protected function firePost($job)
7676
}
7777

7878
$response = json_decode($curlResponse);
79+
80+
if (!$response) {
81+
throw new \Exception($curlResponse);
82+
}
7983

8084
if ($response->status_code !== 200) {
8185
throw new \Exception($response->error_description, $response->error_code);
@@ -86,4 +90,4 @@ protected function firePost($job)
8690
}
8791
}
8892

89-
}
93+
}

0 commit comments

Comments
 (0)