We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
:authorize_with: :error
Ash.get/3
Describe the bug The :authorize_with: :error option is not available with Ash.get/3 but works as expected with Ash.read/2 and Ash.read_one/2.
Ash.read/2
Ash.read_one/2
To Reproduce Pass :authorize_with to Ash.get/3.
:authorize_with
Expected behavior I should get back {:error, %Ash.Error.Forbidden{} and instead an exception is raised:
{:error, %Ash.Error.Forbidden{}
{:error, %Ash.Error.Unknown{ errors: [ %Ash.Error.Unknown.UnknownError{ error: "** (Spark.Options.ValidationError) unknown options [:authorize_with], valid options are: [:error?, :load, :lock, :tenant, :action, :context, :reuse_values?, :domain, :timeout, :tracer, :action, :authorize?, :context, :tenant, :actor]", field: nil, value: nil, splode: Ash.Error, bread_crumbs: [], vars: [], path: [], stacktrace: #Splode.Stacktrace<>, class: :unknown } ] }}
Runtime
Additional context Discussed in Discord already and was told to make an issue.
The text was updated successfully, but these errors were encountered:
I'd like to add that, similarly, this happens with Ash.Changeset.manage_relationship/4.
Ash.Changeset.manage_relationship/4
Sorry, something went wrong.
I made a PR for the Ash.get! fix but not sure what you mean for manage_relationship. Could you expand on that?
Ash.get!
manage_relationship
No branches or pull requests
Describe the bug
The
:authorize_with: :error
option is not available withAsh.get/3
but works as expected withAsh.read/2
andAsh.read_one/2
.To Reproduce
Pass
:authorize_with
toAsh.get/3
.Expected behavior
I should get back
{:error, %Ash.Error.Forbidden{}
and instead an exception is raised:Runtime
Additional context
Discussed in Discord already and was told to make an issue.
The text was updated successfully, but these errors were encountered: