mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 13:33:20 +12:00
fix: properly handle raised errors from async calculations
fix: ensure depended on attributes are selected in calculations
This commit is contained in:
parent
2c432bb193
commit
ea9ec7dfef
2 changed files with 4 additions and 0 deletions
|
@ -75,6 +75,9 @@ defmodule Ash.Actions.Read.AsyncLimiter do
|
||||||
{:ok, term} ->
|
{:ok, term} ->
|
||||||
term
|
term
|
||||||
|
|
||||||
|
{:ok, {:__exception__, e, stacktrace}} ->
|
||||||
|
reraise e, stacktrace
|
||||||
|
|
||||||
{:exit, term} ->
|
{:exit, term} ->
|
||||||
{:error, term}
|
{:error, term}
|
||||||
|
|
||||||
|
|
|
@ -673,6 +673,7 @@ defmodule Ash.Actions.Read.Calculations do
|
||||||
query
|
query
|
||||||
| load_through: load_through
|
| load_through: load_through
|
||||||
}
|
}
|
||||||
|
|> Ash.Query.ensure_selected(attr.name)
|
||||||
end
|
end
|
||||||
|
|
||||||
agg = Ash.Resource.Info.aggregate(query.resource, load) ->
|
agg = Ash.Resource.Info.aggregate(query.resource, load) ->
|
||||||
|
|
Loading…
Reference in a new issue