Skip to content

Book Example didn't work - section 3.10 #1

@bhougland18

Description

@bhougland18

Hello,

I am a new Elixir programmer so I probably made a mistake, but I am having trouble with the iex example in section 3.10. When I execute the following command into iex

iex(1)> Tuesday.Playground.Timestamp |> Ash.Changeset.for_create(:create, %{title: "Hello"}) |> Ash.Changeset.apply_attributes

I get the following output:

** (Ash.Error.Forbidden)
Forbidden Error

  • The domain Tuesday.Playground requires that an actor is provided at all times and none was provided.
    (ash 3.5.7) lib/ash/error/forbidden/domain_requires_actor.ex:4: Ash.Error.Forbidden.DomainRequiresActor.exception/1
    (ash 3.5.7) lib/ash/actions/helpers.ex:322: Ash.Actions.Helpers.add_actor/3
    (ash 3.5.7) lib/ash/actions/helpers.ex:274: Ash.Actions.Helpers.set_opts/3
    (ash 3.5.7) lib/ash/actions/helpers.ex:263: Ash.Actions.Helpers.set_context_and_get_opts/3
    (ash 3.5.7) lib/ash/changeset/changeset.ex:2086: Ash.Changeset.do_for_action/4
    (elixir 1.16.3) elixir.erl:405: :elixir.eval_external_handler/3
    (stdlib 4.3.1.4) erl_eval.erl:748: :erl_eval.do_apply/7
    (stdlib 4.3.1.4) erl_eval.erl:961: :erl_eval.expr_list/7
    (stdlib 4.3.1.4) erl_eval.erl:454: :erl_eval.expr/6
    (elixir 1.16.3) elixir.erl:378: :elixir.eval_forms/4
    (elixir 1.16.3) lib/module/parallel_checker.ex:112: Module.ParallelChecker.verify/1
    (iex 1.16.3) lib/iex/evaluator.ex:332: IEx.Evaluator.eval_and_inspect/3
    (iex 1.16.3) lib/iex/evaluator.ex:306: IEx.Evaluator.eval_and_inspect_parsed/3
    (iex 1.16.3) lib/iex/evaluator.ex:295: IEx.Evaluator.parse_eval_inspect/4
    (iex 1.16.3) lib/iex/evaluator.ex:187: IEx.Evaluator.loop/1
    (iex 1.16.3) lib/iex/evaluator.ex:32: IEx.Evaluator.init/5
    (stdlib 4.3.1.4) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
    (ash 3.5.7) lib/ash/actions/helpers.ex:321: Ash.Actions.Helpers.add_actor/3
    (ash 3.5.7) lib/ash/actions/helpers.ex:274: Ash.Actions.Helpers.set_opts/3
    (ash 3.5.7) lib/ash/actions/helpers.ex:263: Ash.Actions.Helpers.set_context_and_get_opts/3
    (ash 3.5.7) lib/ash/changeset/changeset.ex:2086: Ash.Changeset.do_for_action/4
    iex:1: (file)

Any help you can provide would be appreciaed!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions