From a3b51068f0a7e6373f039d7b3251e8d89c94053b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Sat, 27 Jul 2024 01:06:43 +0700 Subject: [PATCH] Improve error message in the Fly runtime config when the app name is taken --- .../live/session_live/fly_runtime_component.ex | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/livebook_web/live/session_live/fly_runtime_component.ex b/lib/livebook_web/live/session_live/fly_runtime_component.ex index cf5e501a4..e2fc4f4d9 100644 --- a/lib/livebook_web/live/session_live/fly_runtime_component.ex +++ b/lib/livebook_web/live/session_live/fly_runtime_component.ex @@ -307,6 +307,18 @@ defmodule LivebookWeb.SessionLive.FlyRuntimeComponent do """ end + defp app_check_error(%{error: %{status: 403}} = assigns) do + ~H""" + <.message_box + kind={:error} + message={ + "This app name is already taken, pick a different name." <> + " If this is an app you own, enter a token for the corresponding organization." + } + /> + """ + end + defp app_check_error(assigns) do ~H""" <.message_box kind={:error} message={"Error: " <> @error.message} />