Make exceptions look better

This commit is contained in:
2023-01-16 19:39:28 +01:00
parent 6bab06ef6a
commit 44bf5e12bf
2 changed files with 12 additions and 2 deletions

View File

@ -7,7 +7,13 @@
{% if not feed.updates_enabled %}<span class="text-danger">Disabled</span>{% endif %}
{% if feed.last_exception %}Last exception: {{ feed.last_exception }}{% endif %}
{% if feed.last_exception %}
<h3 class="text-danger">{{ feed.last_exception.type_name }}:</h3>
<code>{{ feed.last_exception.value_str }}</code>
<pre><code>{{ feed.last_exception.traceback_str }}</code></pre>
{% endif %}
<form action="/remove" method="post">
<button class="btn btn-danger btn-sm" name="feed_url" value="{{ feed.url }}"

View File

@ -43,7 +43,11 @@
{% set hook_from_feed = feed_webhook["webhook"] %}
{% if hook_from_context.url == hook_from_feed %}
<a class="text-muted"
href="/feed?feed_url={{ feed.url|encode_url }}">{{ feed.url }}</a>
href="/feed?feed_url={{ feed.url|encode_url }}">{{ feed.url }}
{% if feed.last_exception %}
<span class="text-danger">({{ feed.last_exception.value_str }})</span>
{% endif %}
</a>
{% endif %}
{% endfor %}
</ul>