You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When trying to send an event to a topic that has not been registered with EventBus.register_topic/1, you get an error like the following:
[warn] Topic(:foodoesn't exist!) doesn't have subscribers
This should be clarified to show either the topic doesn't exist, or it doesn't have subscribers, and not display registration_status within the braces. Additionally, it should print the topic exactly as the user has passed, instead of coercing it to look like an atom, as the log message is confusing if the user has passed a string topic instead of an atom.
Thanks for reporting the issue. I agree on on brackets but for the topic type, if any other type is given the type checker would block it. So, expectation is from the library user to use a type checker. Feel free to create a PR to remove ambiguity inside brackets. Please make sure that tests are covered.
Describe the bug
When trying to send an event to a topic that has not been registered with
EventBus.register_topic/1
, you get an error like the following:This should be clarified to show either the topic doesn't exist, or it doesn't have subscribers, and not display
registration_status
within the braces. Additionally, it should print the topic exactly as the user has passed, instead of coercing it to look like an atom, as the log message is confusing if the user has passed a string topic instead of an atom.Below is the offending line:
event_bus/lib/event_bus/services/notification.ex
Line 67 in 7c1456c
To Reproduce
Send an
%EventBus.Model.Event{}
to a non-registered topic and observe the warn log entry.Expected behavior
As per above.
I can submit a PR if you'd like, I just wanted to report and run my suggestions by you before starting.
The text was updated successfully, but these errors were encountered: