Improve error message in the Fly runtime config when the app name is taken

This commit is contained in:
Jonatan Kłosko 2024-07-27 01:06:43 +07:00
parent f054f34603
commit 0df5415020

View file

@ -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} />