From ba4e7b40ae156997aeb2eaca00f5ccce515e8374 Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Mon, 1 May 2023 20:39:20 -0400 Subject: [PATCH] improvement: better messages for missed notifications --- lib/ash/actions/helpers.ex | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/ash/actions/helpers.ex b/lib/ash/actions/helpers.ex index 7e7fc961..f00f97ee 100644 --- a/lib/ash/actions/helpers.ex +++ b/lib/ash/actions/helpers.ex @@ -214,6 +214,14 @@ defmodule Ash.Actions.Helpers do `return_notifications?: true`. If you are in a changeset hook, you can return the notifications. If not, you can send the notifications using `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 -> @@ -228,6 +236,16 @@ defmodule Ash.Actions.Helpers do `Ash.Notifier.notify/1` once your resources are out of a transaction. #{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