mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-07 05:24:40 +08:00
Remove root layout for errors
This commit is contained in:
parent
7c348d9c20
commit
0e22e06135
2 changed files with 3 additions and 0 deletions
|
@ -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}"
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue