diff --git a/lib/livebook_web/controllers/error_html.ex b/lib/livebook_web/controllers/error_html.ex
index a9d87ae1c..edab10b80 100644
--- a/lib/livebook_web/controllers/error_html.ex
+++ b/lib/livebook_web/controllers/error_html.ex
@@ -1,9 +1,61 @@
defmodule LivebookWeb.ErrorHTML do
use LivebookWeb, :html
- embed_templates "error_html/*"
+ def render("404.html", assigns) do
+ ~H"""
+ <.error_page status={@status} title="No Numbats here!" />
+ """
+ end
+
+ def render("403.html", assigns) do
+ ~H"""
+ <.error_page status={@status} title="No Numbats allowed here!" />
+ """
+ end
def render(_template, assigns) do
- render("500.html", assigns)
+ ~H"""
+ <.error_page
+ status={@status}
+ title="Something went wrong."
+ details="Check out the console for logs for more information."
+ />
+ """
+ end
+
+ attr :status, :integer, required: true
+ attr :title, :string, required: true
+ attr :details, :string, default: nil
+
+ defp error_page(assigns) do
+ ~H"""
+
+
+
+
+
+
+
+
+ <%= @status %> - Livebook
+
+
+
+
+
+
+
+
+
+ <%= @title %>
+
+
+ <%= @details %>
+
+
+
+
+
+ """
end
end
diff --git a/lib/livebook_web/controllers/error_html/403.html.heex b/lib/livebook_web/controllers/error_html/403.html.heex
deleted file mode 100644
index 402c77d30..000000000
--- a/lib/livebook_web/controllers/error_html/403.html.heex
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
- <%= @status %> - Livebook
-
-
-
-
-
-
-
-
-
- No Numbats allowed here!
-
-
-
-
-
diff --git a/lib/livebook_web/controllers/error_html/404.html.heex b/lib/livebook_web/controllers/error_html/404.html.heex
deleted file mode 100644
index 7c2d8d85c..000000000
--- a/lib/livebook_web/controllers/error_html/404.html.heex
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
- <%= @status %> - Livebook
-
-
-
-
-
-
-
-
-
- No Numbats here!
-
-
-
-
-
diff --git a/lib/livebook_web/controllers/error_html/500.html.heex b/lib/livebook_web/controllers/error_html/500.html.heex
deleted file mode 100644
index 7f39b044b..000000000
--- a/lib/livebook_web/controllers/error_html/500.html.heex
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
- <%= @status %> - Livebook
-
-
-
-
-
-
-
-
-
- Something went wrong.
-
-
- Check out the console for logs for more information.
-
-
-
-
-