File tree Expand file tree Collapse file tree 5 files changed +13
-13
lines changed Expand file tree Collapse file tree 5 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 8
8
use MeiliSearch \Bundle \Model \Aggregator ;
9
9
use MeiliSearch \Bundle \SearchService ;
10
10
use MeiliSearch \Client ;
11
- use MeiliSearch \Exceptions \HTTPRequestException ;
11
+ use MeiliSearch \Exceptions \ApiException ;
12
12
use MeiliSearch \Exceptions \TimeOutException ;
13
13
use Symfony \Component \Console \Input \InputInterface ;
14
14
use Symfony \Component \Console \Input \InputOption ;
@@ -76,7 +76,7 @@ protected function configure()
76
76
* {@inheritdoc}
77
77
*
78
78
* @throws TimeOutException
79
- * @throws HTTPRequestException
79
+ * @throws ApiException
80
80
*/
81
81
protected function execute (InputInterface $ input , OutputInterface $ output ): int
82
82
{
Original file line number Diff line number Diff line change 3
3
namespace MeiliSearch \Bundle ;
4
4
5
5
use MeiliSearch \Client ;
6
- use MeiliSearch \Exceptions \HTTPRequestException ;
6
+ use MeiliSearch \Exceptions \ApiException ;
7
7
use Symfony \Component \Serializer \Exception \ExceptionInterface ;
8
8
use function count ;
9
9
use function reset ;
@@ -37,7 +37,7 @@ public function __construct(Client $client)
37
37
*
38
38
* @return array
39
39
*
40
- * @throws HTTPRequestException
40
+ * @throws ApiException
41
41
* @throws ExceptionInterface
42
42
*/
43
43
public function index ($ searchableEntities ): array
@@ -121,7 +121,7 @@ public function remove($searchableEntities): array
121
121
*
122
122
* @return array
123
123
*
124
- * @throws HTTPRequestException
124
+ * @throws ApiException
125
125
*/
126
126
public function clear (string $ indexName ): array
127
127
{
Original file line number Diff line number Diff line change 14
14
use MeiliSearch \Bundle \Test \Entity \Post ;
15
15
use MeiliSearch \Client ;
16
16
use MeiliSearch \Endpoints \Indexes ;
17
- use MeiliSearch \Exceptions \HTTPRequestException ;
17
+ use MeiliSearch \Exceptions \ApiException ;
18
18
use Symfony \Bundle \FrameworkBundle \Console \Application ;
19
19
use Symfony \Component \Console \Tester \CommandTester ;
20
20
@@ -53,7 +53,7 @@ class CommandsTest extends BaseTest
53
53
/**
54
54
* @inheritDoc
55
55
* @throws DBALException
56
- * @throws HTTPRequestException
56
+ * @throws ApiException
57
57
* @throws Exception
58
58
*/
59
59
public function setUp (): void
@@ -77,7 +77,7 @@ public function cleanUp()
77
77
$ this ->searchService ->delete (Post::class);
78
78
$ this ->searchService ->delete (Comment::class);
79
79
$ this ->searchService ->delete (ContentAggregator::class);
80
- } catch (HTTPRequestException $ e ) {
80
+ } catch (ApiException $ e ) {
81
81
$ this ->assertEquals ('Index sf_phpunit__comments not found ' , $ e ->getMessage ());
82
82
}
83
83
}
Original file line number Diff line number Diff line change 5
5
use Exception ;
6
6
use MeiliSearch \Bundle \Engine ;
7
7
use MeiliSearch \Bundle \Test \BaseTest ;
8
- use MeiliSearch \Exceptions \HTTPRequestException ;
8
+ use MeiliSearch \Exceptions \ApiException ;
9
9
10
10
/**
11
11
* Class EngineTest
@@ -45,7 +45,7 @@ public function testIndexingEmptyEntity()
45
45
try {
46
46
$ this ->engine ->search ('query ' , $ searchableImage ->getIndexName (), []);
47
47
} catch (Exception $ e ) {
48
- $ this ->assertInstanceOf (HTTPRequestException ::class, $ e );
48
+ $ this ->assertInstanceOf (ApiException ::class, $ e );
49
49
}
50
50
}
51
51
}
Original file line number Diff line number Diff line change 14
14
use MeiliSearch \Bundle \Test \Entity \Post ;
15
15
use MeiliSearch \Client ;
16
16
use MeiliSearch \Endpoints \Indexes ;
17
- use MeiliSearch \Exceptions \HTTPRequestException ;
17
+ use MeiliSearch \Exceptions \ApiException ;
18
18
use Symfony \Bundle \FrameworkBundle \Console \Application ;
19
19
use Symfony \Component \Console \Tester \CommandTester ;
20
20
@@ -53,7 +53,7 @@ class SearchTest extends BaseTest
53
53
/**
54
54
* @inheritDoc
55
55
* @throws DBALException
56
- * @throws HTTPRequestException
56
+ * @throws ApiException
57
57
* @throws Exception
58
58
*/
59
59
public function setUp (): void
@@ -77,7 +77,7 @@ public function cleanUp()
77
77
$ this ->searchService ->delete (Post::class);
78
78
$ this ->searchService ->delete (Comment::class);
79
79
$ this ->searchService ->delete (ContentAggregator::class);
80
- } catch (HTTPRequestException $ e ) {
80
+ } catch (ApiException $ e ) {
81
81
$ this ->assertEquals ('Index sf_phpunit__comments not found ' , $ e ->getMessage ());
82
82
}
83
83
}
You can’t perform that action at this time.
0 commit comments