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
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.
1 Reply
Blibs
BlibsOP3y ago
Ah, found the issue, I need to add that option to the code_interface, not directly to the read action

Did you find this page helpful?