File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 7
7
use GuzzleHttp \Exception \ClientException ;
8
8
use GuzzleHttp \Exception \ServerException ;
9
9
use Illuminate \Config \Repository ;
10
+ use Illuminate \Http \Client \RequestException ;
10
11
use Illuminate \Http \Response ;
11
12
use Illuminate \Pagination \Paginator ;
12
13
use Illuminate \Support \Collection ;
@@ -1431,7 +1432,7 @@ public function get()
1431
1432
$ endpoint = ApiHelper::retrieveAccessToken ();
1432
1433
1433
1434
if (!$ this ->endpoint ) {
1434
- throw new MissingEndpointException (' Please provide an endpoint. ' );
1435
+ throw new MissingEndpointException ();
1435
1436
}
1436
1437
1437
1438
$ cacheKey = 'igdb_cache. ' . md5 ($ this ->endpoint . $ this ->getQuery ());
@@ -1447,6 +1448,7 @@ function () use ($endpoint) {
1447
1448
])
1448
1449
->withBody ($ this ->getQuery (), 'plain/text ' )
1449
1450
->post ($ this ->endpoint )
1451
+ ->throw ()
1450
1452
->json ();
1451
1453
});
1452
1454
@@ -1579,7 +1581,7 @@ public function firstOrFail()
1579
1581
public function count ()
1580
1582
{
1581
1583
if (!$ this ->endpoint ) {
1582
- throw new MissingEndpointException (' Please provide an endpoint. ' );
1584
+ throw new MissingEndpointException ();
1583
1585
}
1584
1586
1585
1587
$ accessToken = ApiHelper::retrieveAccessToken ();
Original file line number Diff line number Diff line change 6
6
7
7
class MissingEndpointException extends Exception
8
8
{
9
- //
9
+ protected $ message = ' Please provide an endpoint. ' ;
10
10
}
You can’t perform that action at this time.
0 commit comments