mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-31 22:00:23 +02:00
feat: improve error/exception ui (#3690)
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
|
||||
<h1>
|
||||
Please authenticate in order to access this instance
|
||||
</h1>
|
15
templates/error.php
Normal file
15
templates/error.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* This template is for rendering error messages (not exceptions)
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php if (isset($title)): ?>
|
||||
<h1>
|
||||
<?= e($title) ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<p>
|
||||
<?= e($message) ?>
|
||||
</p>
|
@@ -1,3 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* This template is used for rendering exceptions
|
||||
*/
|
||||
?>
|
||||
<div class="error">
|
||||
|
||||
<?php if ($e instanceof HttpException): ?>
|
||||
@@ -12,7 +17,7 @@
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($e->getCode() === 404): ?>
|
||||
<h2>The website was not found</h2>
|
||||
<h2>404 Page Not Found</h2>
|
||||
<p>
|
||||
RSS-Bridge tried to fetch a page on a website.
|
||||
But it doesn't exists.
|
||||
@@ -20,13 +25,21 @@
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($e->getCode() === 429): ?>
|
||||
<h2>Try again later</h2>
|
||||
<h2>429 Try again later</h2>
|
||||
<p>
|
||||
RSS-Bridge tried to fetch a website.
|
||||
They told us to try again later.
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($e->getCode() === 503): ?>
|
||||
<h2>503 Service Unavailable</h2>
|
||||
<p>
|
||||
Common causes are a server that is down for maintenance
|
||||
or that is overloaded.
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php else: ?>
|
||||
<?php if ($e->getCode() === 10): ?>
|
||||
<h2>The rss feed is completely empty</h2>
|
Reference in New Issue
Block a user