Skip to content

Commit b7b43e8

Browse files
chore: update search events check
1 parent e03c507 commit b7b43e8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

run_checks.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@
9090

9191
/** @var SearchEventsResponse $result */
9292
list($result, $response) = $client->searchEvents(10, null, null, null, null, $start->getTimestamp() * 1000, $end->getTimestamp() * 1000);
93+
if (!is_countable($result->getEvents()) || count($result->getEvents()) === 0) {
94+
throw new Exception('No events found');
95+
}
9396
fwrite(STDOUT, sprintf("\n\nGot events: %s \n", $response->getBody()->getContents()));
9497
} catch (Exception $e) {
9598
fwrite(STDERR, sprintf("\n\nException when calling FingerprintApi->searchEvents: %s\n", $e->getMessage()));

0 commit comments

Comments
 (0)