Remove root layout for errors

This commit is contained in:
Alexandre de Souza 2025-08-20 13:01:24 -03:00
parent 7c348d9c20
commit 0e22e06135
No known key found for this signature in database
GPG key ID: E39228FFBA346545
2 changed files with 3 additions and 0 deletions

View file

@ -87,6 +87,7 @@ defmodule Livebook.ZTA.LivebookTeams do
|> put_status(:bad_request) |> put_status(:bad_request)
|> delete_session(:teams_error) |> delete_session(:teams_error)
|> put_view(LivebookWeb.ErrorHTML) |> put_view(LivebookWeb.ErrorHTML)
|> put_root_layout(false)
|> render("400.html", %{status: 400}) |> render("400.html", %{status: 400})
|> halt(), nil} |> halt(), nil}
@ -95,6 +96,7 @@ defmodule Livebook.ZTA.LivebookTeams do
|> put_status(:forbidden) |> put_status(:forbidden)
|> delete_session(:teams_failed_reason) |> delete_session(:teams_failed_reason)
|> put_view(LivebookWeb.ErrorHTML) |> put_view(LivebookWeb.ErrorHTML)
|> put_root_layout(false)
|> render("error.html", %{ |> render("error.html", %{
status: 403, status: 403,
details: "Failed to authenticate with Livebook Teams: #{reason}" details: "Failed to authenticate with Livebook Teams: #{reason}"

View file

@ -53,6 +53,7 @@ defmodule LivebookWeb.UserPlug do
conn conn
|> put_status(:forbidden) |> put_status(:forbidden)
|> put_view(LivebookWeb.ErrorHTML) |> put_view(LivebookWeb.ErrorHTML)
|> put_root_layout(false)
|> render("403.html", %{status: 403}) |> render("403.html", %{status: 403})
|> halt() |> halt()
end end