mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-23 06:56:53 +00:00
[index] Clarify error message during data transformation
An empty list of items should not throw an exception as this is technically still a valid feed (just empty). Instead the error message should focus on actual transformation errors.
This commit is contained in:
parent
431e35e07f
commit
27fad6d2af
10
index.php
10
index.php
@ -197,12 +197,7 @@ EOD;
|
||||
// Data transformation
|
||||
try {
|
||||
$format = Format::create($format);
|
||||
$items = $bridge->getItems();
|
||||
if(empty($items)){
|
||||
throw new Exception('No results for this query', 503);
|
||||
}
|
||||
|
||||
$format->setItems($items);
|
||||
$format->setItems($bridge->getItems());
|
||||
$format->setExtraInfos($bridge->getExtraInfos());
|
||||
$format->display();
|
||||
} catch(Exception $e){
|
||||
@ -217,7 +212,7 @@ EOD;
|
||||
. $bridge->getMaintainer();
|
||||
|
||||
$message = <<<EOD
|
||||
{$bridge->getName()} was unable to receive or process the remote website's content.
|
||||
RSS-Bridge was unable to transform the contents returned by {$bridge->getName()}!
|
||||
Check your input parameters or press F5 to retry.
|
||||
|
||||
Use the following link to notify the bridge maintainer if this error persists:
|
||||
@ -233,6 +228,7 @@ EOD;
|
||||
header('Content-Type: text/plain');
|
||||
die($message);
|
||||
}
|
||||
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user