`AshGraphql.Error` not implemented
Looks like a policy error is being raised and not caught somewhere:
12 Replies
Here's the trace:
🤔 interesting
In that case its showing an
Erlang error
is that the whole message? Can you show more?I think I tracked it down to a missing
alias
for the module in accessing_from
. Probably this should be raised as-is.
Out of curiosity, should accessing_from
be available in expr
? Or how would one do ||
with accessing_from
?You wouldn't,
accessing_from
is a check
, and so would need to be arranged via combinations of check types
i.e
That would be accessing from ... or expr(name == "fred")
, for exampleAh, yes, so I want to say:
Right now I simply have it broken into two policies.
Ah, yeah I see what you mean. Unfortunately there is no way to do that currently (but additional policies for example would do it)
You can also copy the
accessing_from
implementation and write your own that does the ||
inside the check
policy [action_type(:read), AccessingFromFooOrBar]
can you show me the missing alias that you're talking about?
oh, you mean in your own code
Yeah, so thats not the reason you got an Erlang error
** (ErlangError) Erlang error: {%Ash.Error.Forbidden{errors: [%Ash.Error.Forbidden.Policy{scenarios: [], facts: %{false => false, true => true...
Somewhere we pattern matched on something wrong it seems like
can I see more of the error message?Agreed, think that was surfacing it though
Yep, just a sec
Had to redact, user data, let me know if it's still useful.
🤔 I'm still not seeing the
Erlang error
part you originally mentionedVery strange...are you on the latest ash/ash_graphql?
d4ee7c5ac237eb4876fbf5f96248b340c74d5253
Can you open this as an issue on
ash_graphql
? Want to track it, but don't have time to fix it at the moment