From 7ec1cfe84e418ae9abb5ae81dd9df84da20d2cf1 Mon Sep 17 00:00:00 2001 From: Col Date: Thu, 23 May 2024 22:58:58 +1000 Subject: [PATCH] improvement: Implement AshGraphql.Error for Ash.Error.Query.ReadActionRequiresActor (#154) --- lib/error.ex | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/error.ex b/lib/error.ex index 7ffc8eb..44e2e39 100644 --- a/lib/error.ex +++ b/lib/error.ex @@ -142,6 +142,18 @@ defimpl AshGraphql.Error, for: Ash.Error.Forbidden.ForbiddenField do end end +defimpl AshGraphql.Error, for: Ash.Error.Query.ReadActionRequiresActor do + def to_error(_error) do + %{ + message: "forbidden", + short_message: "forbidden", + vars: %{}, + code: "forbidden", + fields: [] + } + end +end + defimpl AshGraphql.Error, for: Ash.Error.Invalid.InvalidPrimaryKey do def to_error(error) do %{