improvement: Implement AshGraphql.Error for Ash.Error.Query.ReadActionRequiresActor (#154)

This commit is contained in:
Col 2024-05-23 22:58:58 +10:00 committed by GitHub
parent 2bc7b78aa6
commit 7ec1cfe84e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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
%{