Ash FrameworkAF
Ash Framework3y ago
1 reply
Blibs

undefined function not_found_error?/1 in read action

I have this read action:

    read :last_own_bid do
      get? true
      not_found_error? false

      argument :property_id, :uuid do
        allow_nil? false
      end

      prepare build(sort: [updated_at: :desc], limit: 1)

      filter expr(property_id == ^arg(:property_id) and bidder_id == ^actor(:id))
    end


And I want for it to return nil instead of a not found error, but when I add the not_found_error? option, the code doesn't compile saying that not_found_error?/1 is undefined.
Was this page helpful?