mirror of
https://github.com/ash-project/ash_graphql.git
synced 2024-09-19 12:53:40 +12:00
improvement: Implement AshGraphql.Error for Ash.Error.Query.ReadActionRequiresActor (#154)
This commit is contained in:
parent
2bc7b78aa6
commit
7ec1cfe84e
1 changed files with 12 additions and 0 deletions
12
lib/error.ex
12
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
|
||||
%{
|
||||
|
|
Loading…
Reference in a new issue