
arcanemachine
Failing test: "can find artists by partial name match" (page 169)
When starting fresh with the chapter-6
branch (commit hash #bff7f585
), the second test in chapter 7 fails with the following error:
1) test Tunez.Music.search_artists!/1-3 can find artists by partial name match (Tunez.Music.ArtistTest)
test/tunez/music/artist_test.exs:14
** (Ash.Error.Forbidden)
Bread Crumbs:
> Error returned from: Tunez.Music.Artist.create
Forbidden Error
* forbidden
(ash 3.4.55) lib/ash/error/forbidden/policy.ex:9: Ash.Error.Forbidden.Policy."exception (overridable 2)"/1
(ash 3.4.55) lib/ash/error/forbidden/policy.ex:31: Ash.Error.Forbidden.Policy.exception/1
(ash 3.4.55) lib/ash/policy/authorizer/authorizer.ex:1727: Ash.Policy.Authorizer.handle_strict_check_result/2
(ash 3.4.55) lib/ash/policy/authorizer/authorizer.ex:698: Ash.Policy.Authorizer.strict_check/2
(ash 3.4.55) lib/ash/can.ex:498: anonymous fn/6 in Ash.Can.run_check/4
(elixir 1.18.2) lib/enum.ex:4964: Enumerable.List.reduce/3
(elixir 1.18.2) lib/enum.ex:2600: Enum.reduce_while/3
(ash 3.4.55) lib/ash/can.ex:495: Ash.Can.run_check/4
(ash 3.4.55) lib/ash/can.ex:163: Ash.Can.can/4
(ash 3.4.55) lib/ash.ex:1349: Ash.can/3
(ash 3.4.55) lib/ash/actions/create/create.ex:167: Ash.Actions.Create.authorize/2
(ash 3.4.55) lib/ash/actions/create/create.ex:131: Ash.Actions.Create.do_run/4
(ash 3.4.55) lib/ash/actions/create/create.ex:50: Ash.Actions.Create.run/4
(ash 3.4.55) lib/ash.ex:2182: Ash.create!/3
test/tunez/music/artist_test.exs:16: Tunez.Music.ArtistTest."test Tunez.Music.search_artists!/1-3 can find artists by partial name match"/1
(ex_unit 1.18.2) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2
(stdlib 6.2) timer.erl:595: :timer.tc/2
(ex_unit 1.18.2) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4
code: Tunez.Music.create_artist!(%{
stacktrace:
(ash 3.4.55) lib/ash/error/forbidden.ex:3: Ash.Error.Forbidden.exception/1
(ash 3.4.55) /home/tower/code/ash/tunez/deps/splode/lib/splode.ex:264: Ash.Error.to_class/2
(ash 3.4.55) lib/ash/error/error.ex:108: Ash.Error.to_error_class/2
(ash 3.4.55) lib/ash/actions/create/create.ex:155: Ash.Actions.Create.do_run/4
(ash 3.4.55) lib/ash/actions/create/create.ex:50: Ash.Actions.Create.run/4
(ash 3.4.55) lib/ash.ex:2182: Ash.create!/3
test/tunez/music/artist_test.exs:16: (test)
Most Liked

sevenseacat
Author of Ash Framework
It does too, it’s missing either generating a user and using them as the actor, or using authorize?: false
I’ll fix that, thank you!
1
Popular Pragmatic Bookshelf topics

Hi Brian,
Looks like the api for tinydb has changed a little. Noticed while working on chapter 7 that the .purge() call to the db throws...
New

Title: Web Development with Clojure, Third Edition - migrations/create not working: p159
When I execute the command:
user=> (create-...
New

Title: Hands-On Rust (Chap 8 (Adding a Heads Up Display)
It looks like
.with_simple_console_no_bg(SCREEN_WIDTH*2, SCREEN_HEIGHT*2...
New

Dear Sophie.
I tried to do the “Authorization” exercise and have two questions:
When trying to plug in an email-service, I found the ...
New

I’m a newbie to Rails 7 and have hit an issue with the bin/Dev script mentioned on pages 112-113.
Iteration A1 - Seeing the list of prod...
New

Hi, I need some help, I’m new to rust and was learning through your book. but I got stuck at the last stage of distribution. Whenever I t...
New

Hi, I’m working on the Chapter 8 of the book.
After I add add the point_offset, I’m still able to see acne:
In the image above, I re...
New

I am using Android Studio Chipmunk | 2021.2.1 Patch 2
Build #AI-212.5712.43.2112.8815526, built on July 10, 2022
Runtime version: 11.0....
New

@mfazio23
I’ve applied the changes from Chapter 5 of the book and everything builds correctly and runs. But, when I try to start a game,...
New

I just bought this book to learn about Android development, and I’m already running into a major issue in Ch. 1, p. 20: “Update activity...
New
Other popular topics

poll
poll
Be sure to check out @Dusty’s article posted here: An Introduction to Alternative Keyboard Layouts It’s one of the best write-...
New

Not sure if following fits exactly this thread, or if we should have a hobby thread…
For many years I’m designing and building model air...
New

In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first:
asdf plugin-upd...
New

If you are experiencing Rails console using 100% CPU on your dev machine, then updating your development and test gems might fix the issu...
New

Build highly interactive applications without ever leaving Elixir, the way the experts do. Let LiveView take care of performance, scalabi...
New

The V Programming Language
Simple language for building maintainable programs
V is already mentioned couple of times in the forum, but I...
New

This is going to be a long an frequently posted thread.
While talking to a friend of mine who has taken data structure and algorithm cou...
New

If you want a quick and easy way to block any website on your Mac using Little Snitch simply…
File > New Rule:
And select Deny, O...
New

Author Spotlight:
VM Brasseur
@vmbrasseur
We have a treat for you today! We turn the spotlight onto Open Source as we sit down with V...
New

This is cool!
DEEPSEEK-V3 ON M4 MAC: BLAZING FAST INFERENCE ON APPLE SILICON
We just witnessed something incredible: the largest open-s...
New
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /ruby
- /wasm
- /erlang
- /phoenix
- /keyboards
- /rails
- /js
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /emacs
- /java
- /haskell
- /onivim
- /svelte
- /typescript
- /crystal
- /c-plus-plus
- /kotlin
- /tailwind
- /gleam
- /react
- /ocaml
- /elm
- /flutter
- /vscode
- /ash
- /opensuse
- /centos
- /php
- /deepseek
- /html
- /scala
- /zig
- /sublime-text
- /textmate
- /debian
- /nixos
- /lisp
- /agda
- /react-native
- /kubuntu
- /arch-linux
- /ubuntu
- /revery
- /spring
- /django
- /manjaro
- /diversity
- /nodejs
- /lua
- /slackware
- /julia
- /c
- /neovim