mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 05:23:03 +12:00
improvement: better messages for missed notifications
This commit is contained in:
parent
c6bf1c1fb1
commit
ba4e7b40ae
1 changed files with 18 additions and 0 deletions
|
@ -214,6 +214,14 @@ defmodule Ash.Actions.Helpers do
|
||||||
`return_notifications?: true`. If you are in a changeset hook, you can
|
`return_notifications?: true`. If you are in a changeset hook, you can
|
||||||
return the notifications. If not, you can send the notifications using
|
return the notifications. If not, you can send the notifications using
|
||||||
`Ash.Notifier.notify/1` once your resources are out of a transaction.
|
`Ash.Notifier.notify/1` once your resources are out of a transaction.
|
||||||
|
|
||||||
|
To ignore these in all cases:
|
||||||
|
|
||||||
|
config :ash, :missed_notifications, :ignore
|
||||||
|
|
||||||
|
To turn this into warnings:
|
||||||
|
|
||||||
|
config :ash, :missed_notifications, :warn
|
||||||
"""
|
"""
|
||||||
|
|
||||||
:warn ->
|
:warn ->
|
||||||
|
@ -228,6 +236,16 @@ defmodule Ash.Actions.Helpers do
|
||||||
`Ash.Notifier.notify/1` once your resources are out of a transaction.
|
`Ash.Notifier.notify/1` once your resources are out of a transaction.
|
||||||
|
|
||||||
#{Exception.format_stacktrace(stacktrace)}
|
#{Exception.format_stacktrace(stacktrace)}
|
||||||
|
|
||||||
|
While you should likely leave this setting on, you can ignore these or turn them into errors.
|
||||||
|
|
||||||
|
To ignore these in all cases:
|
||||||
|
|
||||||
|
config :ash, :missed_notifications, :ignore
|
||||||
|
|
||||||
|
To turn this into raised errors:
|
||||||
|
|
||||||
|
config :ash, :missed_notifications, :raise
|
||||||
""")
|
""")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue