@@ -432,7 +432,7 @@ private function executeTestCase($test, $testFile, $future)
432
432
} else {
433
433
$ this ->fail ($ exception ->getMessage ());
434
434
}
435
- $ response = array ( );
435
+ $ response = json_decode ( $ exception -> getMessage (), true );
436
436
437
437
438
438
} catch (Conflict409Exception $ exception ) {
@@ -441,15 +441,15 @@ private function executeTestCase($test, $testFile, $future)
441
441
} else {
442
442
$ this ->fail ($ exception ->getMessage ());
443
443
}
444
- $ response = array ( );
444
+ $ response = json_decode ( $ exception -> getMessage (), true );
445
445
446
446
} catch (Forbidden403Exception $ exception ) {
447
447
if ($ expectedError === 'forbidden ' ) {
448
448
$ this ->assertTrue (true );
449
449
} else {
450
450
$ this ->fail ($ exception ->getMessage ());
451
451
}
452
- $ response = array ( );
452
+ $ response = json_decode ( $ exception -> getMessage (), true );
453
453
454
454
} catch (BadRequest400Exception $ exception ){
455
455
if ($ expectedError === 'request ' ) {
@@ -459,7 +459,7 @@ private function executeTestCase($test, $testFile, $future)
459
459
} else {
460
460
$ this ->fail ($ exception ->getMessage ());
461
461
}
462
- $ response = array ( );
462
+ $ response = json_decode ( $ exception -> getMessage (), true );
463
463
464
464
} catch (ServerErrorResponseException $ exception ){
465
465
if ($ expectedError === 'request ' ) {
@@ -469,7 +469,7 @@ private function executeTestCase($test, $testFile, $future)
469
469
} else {
470
470
$ this ->fail ($ exception ->getMessage ());
471
471
}
472
- $ response = array ( );
472
+ $ response = json_decode ( $ exception -> getMessage (), true );
473
473
474
474
} catch (Elasticsearch \Common \Exceptions \RuntimeException $ exception ){
475
475
if ($ expectedError === 'param ' ) {
@@ -479,7 +479,7 @@ private function executeTestCase($test, $testFile, $future)
479
479
} else {
480
480
$ this ->fail ($ exception ->getMessage ());
481
481
}
482
- $ response = array ( );
482
+ $ response = json_decode ( $ exception -> getMessage (), true );
483
483
484
484
} catch (\Exception $ exception ) {
485
485
if ($ expectedError === null ) {
@@ -489,7 +489,7 @@ private function executeTestCase($test, $testFile, $future)
489
489
} else {
490
490
$ this ->fail ($ exception ->getMessage ());
491
491
}
492
- $ response = array ( );
492
+ $ response = json_decode ( $ exception -> getMessage (), true );
493
493
494
494
}
495
495
0 commit comments