From dc45fbfad6a81456c494222fd16444b98c51b4b9 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Sat, 10 Feb 2018 09:15:23 -0600 Subject: [PATCH] Use error template for 404 and 500 --- src/invidious.cr | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index 5373a84d..e5c5553e 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -269,12 +269,14 @@ get "/search" do |env| templated "search" end -get "/:path" do |env| - env.redirect "/" +error 404 do |env| + error_message = "404 Page not found" + templated "error" end error 500 do |env| - templated "index" + error_message = "500 Server error" + templated "error" end public_folder "assets"