Skip to content
Permalink
Browse files

Add an error page

Fixes #3.
  • Loading branch information...
iliana committed Jul 26, 2018
1 parent 57848ec commit 4789f5225a0c6775f41fd4e05f8fc1949985e2be
Showing with 6 additions and 1 deletion.
  1. +1 −1 emojos.py
  2. +5 −0 templates/oh_no.html
@@ -33,7 +33,7 @@ def emojo(domain):
key=operator.itemgetter('shortcode'))
return render_template('emojo.html', domain=domain, emojo=emojo)
except requests.exceptions.RequestException as e:
return render_template('oh_no.html')
return render_template('oh_no.html', domain=domain)


@app.route('/favicon.ico')
@@ -0,0 +1,5 @@
{% extends "base.html" %}
{% block title %}Custom emoji list for {{ domain }}{% endblock title %}
{% block body %}
<p><b>{{ domain }}</b> isn't a fediverse instance or doesn't have a <code>v1/custom_emojis</code> endpoint. :(</p>
{% endblock body %}

0 comments on commit 4789f52

Please sign in to comment.
You can’t perform that action at this time.