mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-23 23:16:53 +00:00
[index] Throw exception if no items received
This adds an exception if no items were returned by the bridge. It might indicate a broken bridge or invalid input parameter.
This commit is contained in:
parent
6e4bc341b7
commit
6f6aaa3aec
@ -168,7 +168,12 @@ try {
|
||||
// Data transformation
|
||||
try {
|
||||
$format = Format::create($format);
|
||||
$format->setItems($bridge->getItems());
|
||||
$items = $bridge->getItems();
|
||||
if(empty($items)){
|
||||
throw new Exception('No results for this query', 503);
|
||||
}
|
||||
|
||||
$format->setItems($items);
|
||||
$format->setExtraInfos($bridge->getExtraInfos());
|
||||
$format->display();
|
||||
} catch(Exception $e){
|
||||
|
Loading…
Reference in New Issue
Block a user