From 7ca85bd985d71aeae98360bdb19b60761e94e88b Mon Sep 17 00:00:00 2001 From: Alexandre de Souza Date: Wed, 20 Aug 2025 13:03:10 -0300 Subject: [PATCH] Allow custom error titles --- lib/livebook_web/controllers/error_html.ex | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/livebook_web/controllers/error_html.ex b/lib/livebook_web/controllers/error_html.ex index 6d44a2759..3c132b7ff 100644 --- a/lib/livebook_web/controllers/error_html.ex +++ b/lib/livebook_web/controllers/error_html.ex @@ -15,7 +15,11 @@ defmodule LivebookWeb.ErrorHTML do def render("error.html", assigns) do ~H""" - <.error_page status={@status} title="Something went wrong." details={@details} /> + <.error_page + status={@status} + title={assigns[:title] || "Something went wrong."} + details={@details} + /> """ end @@ -29,14 +33,13 @@ defmodule LivebookWeb.ErrorHTML do ~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 :title, :string, default: "Something went wrong." attr :details, :string, default: nil def error_page(assigns) do