diff --git a/emojos.py b/emojos.py index 6a953e2..614eddb 100644 --- a/emojos.py +++ b/emojos.py @@ -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') diff --git a/templates/oh_no.html b/templates/oh_no.html new file mode 100644 index 0000000..be6755e --- /dev/null +++ b/templates/oh_no.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} +{% block title %}Custom emoji list for {{ domain }}{% endblock title %} +{% block body %} +

{{ domain }} isn't a fediverse instance or doesn't have a v1/custom_emojis endpoint. :(

+{% endblock body %}