Improve error message for unauthorized deploy (#3048)

This commit is contained in:
Hugo Baraúna 2025-08-19 11:31:56 -03:00 committed by GitHub
parent 9f78eb7bf8
commit 7513202199
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -8,7 +8,7 @@ defmodule Livebook.Teams.Requests do
@deploy_key_prefix Teams.Constants.deploy_key_prefix()
@error_message "Something went wrong, try again later or please file a bug if it persists"
@unauthorized_error_message "You are not authorized to perform this action, make sure you have the access and you are not in a Livebook App Server/Offline instance"
@unauthorized_app_deployment_error_message "You are not authorized to perform this action, make sure you have the access to deploy apps to this deployment group"
@unauthorized_app_deployment_error_message "Deployment not authorized, check deploy permissions for this deployment group"
@typep api_result :: {:ok, map()} | error_result()
@typep error_result :: {:error, map() | String.t()} | {:transport_error, String.t()}

View file

@ -152,7 +152,7 @@ defmodule LivebookCLI.Integration.DeployTest do
assert output =~ "* Preparing to deploy notebook #{slug}.livemd"
assert output =~
"* Test CLI Deploy App failed to deploy. Transport error: You are not authorized to perform this action, make sure you have the access to deploy apps to this deployment group"
"* Test CLI Deploy App failed to deploy. Transport error: Deployment not authorized, check deploy permissions for this deployment group"
refute_receive {:app_deployment_started,
%{

View file

@ -688,7 +688,7 @@ defmodule LivebookWeb.Integration.SessionLiveTest do
|> render_click()
assert render(view) =~
"You are not authorized to perform this action, make sure you have the access to deploy apps to this deployment group"
"Deployment not authorized, check deploy permissions for this deployment group"
end
end
end