[debug] HANDLE EVENT "update_role" in JnbWeb.TeamLive.Form Parameters: %{"form" => %{"role" => "super_admin"}} [error] GenServer #PID<0.1217.0> terminating ** (Ash.Error.Unknown) Bread Crumbs: > Exception raised in bulk update: Jnb.Accounts.User.change_role > Exception raised in: Jnb.Accounts.User.change_role Unknown Error * ** (BadMapError) expected a map, got: [tenant: nil, args: %{role: :super_admin}, context: %{private: %{actor: %Jnb.Accounts.User{id: "dc6dab27-b724-4f6b-b118-78e47c0ad1fc", email: #Ash.CiString<"victor@batarse.dev">, role: :super_admin, confirmed_at: ~U[2025-08-31 21:38:09.704154Z], __meta__: #Ecto.Schema.Metadata<:loaded, "users">}, authorizer_log?: false, authorize?: true, pre_flight_authorization?: false}, data_layer: %{use_atomic_update_data?: true}, changed?: true}, changeset: #Ash.Changeset, role: :super_admin, confirmed_at: ~U[2025-08-31 21:38:09.704154Z], __meta__: #Ecto.Schema.Metadata<:loaded, "users">}, context: %{data_layer: %{use_atomic_update_data?: true}, changed?: true}, valid?: true>] (stdlib 6.2.2.2) :maps.find(:role, [tenant: nil, args: %{role: :super_admin}, context: %{private: %{actor: %Jnb.Accounts.User{id: "dc6dab27-b724-4f6b-b118-78e47c0ad1fc", email: #Ash.CiString<"victor@batarse.dev">, role: :super_admin, confirmed_at: ~U[2025-08-31 21:38:09.704154Z], __meta__: #Ecto.Schema.Metadata<:loaded, "users">}, authorizer_log?: false, authorize?: true, pre_flight_authorization?: false}, data_layer: %{use_atomic_update_data?: true}, changed?: true}, changeset: #Ash.Changeset, role: :super_admin, confirmed_at: ~U[2025-08-31 21:38:09.704154Z], __meta__: #Ecto.Schema.Metadata<:loaded, "users">}, context: %{data_layer: %{use_atomic_update_data?: true}, changed?: true}, valid?: true>]) (ash 3.5.37) lib/ash/expr/expr.ex:229: anonymous fn/2 in Ash.Expr.fill_template/2 (ash 3.5.37) lib/ash/expr/expr.ex:522: Ash.Expr.walk_template/2 (elixir 1.18.4) lib/enum.ex:1714: Enum."-map/2-lists^map/1-1-"/2 (ash 3.5.37) lib/ash/expr/expr.ex:499: Ash.Expr.walk_template/2 (ash 3.5.37) lib/ash/policy/check/expression.ex:3: Ash.Policy.Check.Expression.expand_description/3 (ash 3.5.37) lib/ash/error/forbidden/policy.ex:513: Ash.Error.Forbidden.Policy.describe/5 (ash 3.5.37) lib/ash/error/forbidden/policy.ex:485: Ash.Error.Forbidden.Policy.describe_check/8 (ash 3.5.37) lib/ash/error/forbidden/policy.ex:449: anonymous fn/7 in Ash.Error.Forbidden.Policy.describe_checks/6 (elixir 1.18.4) lib/enum.ex:2546: Enum."-reduce/3-lists^foldl/2-0-"/3 (ash 3.5.37) lib/ash/error/forbidden/policy.ex:413: Ash.Error.Forbidden.Policy.describe_checks/6 (ash 3.5.37) lib/ash/error/forbidden/policy.ex:328: Ash.Error.Forbidden.Policy.explain_policy/6 (elixir 1.18.4) lib/enum.ex:1714: Enum."-map/2-lists^map/1-1-"/2 (ash 3.5.37) lib/ash/error/forbidden/policy.ex:245: anonymous fn/4 in Ash.Error.Forbidden.Policy.get_breakdown/4 (ash 3.5.37) lib/ash/error/forbidden/policy.ex:243: Ash.Error.Forbidden.Policy.get_breakdown/4 (elixir 1.18.4) lib/enum.ex:1714: Enum."-map/2-lists^map/1-1-"/2 (ash 3.5.37) lib/ash/error/forbidden/policy.ex:97: Ash.Error.Forbidden.Policy.report/2 (ash 3.5.37) lib/ash/error/forbidden/policy.ex:43: Ash.Error.Forbidden.Policy.exception/1 (ash 3.5.37) lib/ash/policy/authorizer/authorizer.ex:1767: Ash.Policy.Authorizer.handle_strict_check_result/2 (ash 3.5.37) lib/ash/policy/authorizer/authorizer.ex:693: Ash.Policy.Authorizer.strict_check/2 (stdlib 6.2.2.2) :maps.find(:role, [tenant: nil, args: %{role: :super_admin}, context: %{private: %{actor: %Jnb.Accounts.User{id: "dc6dab27-b724-4f6b-b118-78e47c0ad1fc", email: #Ash.CiString<"victor@batarse.dev">, role: :super_admin, confirmed_at: ~U[2025-08-31 21:38:09.704154Z], __meta__: #Ecto.Schema.Metadata<:loaded, "users">}, authorizer_log?: false, authorize?: true, pre_flight_authorization?: false}, data_layer: %{use_atomic_update_data?: true}, changed?: true}, changeset: #Ash.Changeset, role: :super_admin, confirmed_at: ~U[2025-08-31 21:38:09.704154Z], __meta__: #Ecto.Schema.Metadata<:loaded, "users">}, context: %{data_layer: %{use_atomic_update_data?: true}, changed?: true}, valid?: true>]) (ash 3.5.37) lib/ash/expr/expr.ex:229: anonymous fn/2 in Ash.Expr.fill_template/2 (ash 3.5.37) lib/ash/expr/expr.ex:522: Ash.Expr.walk_template/2 (elixir 1.18.4) lib/enum.ex:1714: Enum."-map/2-lists^map/1-1-"/2 (ash 3.5.37) lib/ash/expr/expr.ex:499: Ash.Expr.walk_template/2 (ash 3.5.37) lib/ash/policy/check/expression.ex:3: Ash.Policy.Check.Expression.expand_description/3 (ash 3.5.37) lib/ash/error/forbidden/policy.ex:513: Ash.Error.Forbidden.Policy.describe/5 (ash 3.5.37) lib/ash/error/forbidden/policy.ex:485: Ash.Error.Forbidden.Policy.describe_check/8 (ash 3.5.37) lib/ash/error/forbidden/policy.ex:449: anonymous fn/7 in Ash.Error.Forbidden.Policy.describe_checks/6 (elixir 1.18.4) lib/enum.ex:2546: Enum."-reduce/3-lists^foldl/2-0-"/3 (ash 3.5.37) lib/ash/error/forbidden/policy.ex:413: Ash.Error.Forbidden.Policy.describe_checks/6 (ash 3.5.37) lib/ash/error/forbidden/policy.ex:328: Ash.Error.Forbidden.Policy.explain_policy/6 (elixir 1.18.4) lib/enum.ex:1714: Enum."-map/2-lists^map/1-1-"/2 (ash 3.5.37) lib/ash/error/forbidden/policy.ex:245: anonymous fn/4 in Ash.Error.Forbidden.Policy.get_breakdown/4 (ash 3.5.37) lib/ash/error/forbidden/policy.ex:243: Ash.Error.Forbidden.Policy.get_breakdown/4 (elixir 1.18.4) lib/enum.ex:1714: Enum."-map/2-lists^map/1-1-"/2 (ash 3.5.37) lib/ash/error/forbidden/policy.ex:97: Ash.Error.Forbidden.Policy.report/2 (ash 3.5.37) lib/ash/error/forbidden/policy.ex:43: Ash.Error.Forbidden.Policy.exception/1 (ash 3.5.37) lib/ash/policy/authorizer/authorizer.ex:1767: Ash.Policy.Authorizer.handle_strict_check_result/2 (ash 3.5.37) lib/ash/policy/authorizer/authorizer.ex:693: Ash.Policy.Authorizer.strict_check/2 Process Label: {Phoenix.LiveView, JnbWeb.TeamLive.Form, "lv:phx-GGE41KxHEdsLjxph"} Last message: %Phoenix.Socket.Message{topic: "lv:phx-GGE41KxHEdsLjxph", event: "event", payload: %{"event" => "update_role", "meta" => %{}, "type" => "form", "value" => "form%5Brole%5D=super_admin"}, ref: "40", join_ref: "36"} State: %{socket: #Phoenix.LiveView.Socket, router: JnbWeb.Router, assigns: %{return_to: "show", form: %Phoenix.HTML.Form{source: #AshPhoenix.Form "", "name" => "team tres", "ticket_ids" => []}, source: #Ash.Changeset, ticket_relationship: #Ash.NotLoaded (truncated)