Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(pubsub): do not raise exceptions on publish #1244

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

richard-ramos
Copy link
Member

@richard-ramos richard-ramos commented Feb 6, 2025

As commented on #1243 (comment) the only scenario in which is it possible to have this exception being raised is due to a misconfig when initializing a message in

Since Message.init is used only in these places and it's not expected for a consumer of nim-libp2p to create a Message themselves, adding this assertion is safe as it will immediatly indicate that the message is being initialized incorrectly.

Copy link
Contributor

@NagyZoltanPeter NagyZoltanPeter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's is clear now! Thank you.

@richard-ramos richard-ramos enabled auto-merge (squash) February 6, 2025 18:15
@richard-ramos richard-ramos force-pushed the refactor/publish-pubsub branch from ea57994 to 7aef637 Compare February 6, 2025 21:33
@richard-ramos richard-ramos merged commit 78a4344 into master Feb 7, 2025
18 checks passed
@richard-ramos richard-ramos deleted the refactor/publish-pubsub branch February 7, 2025 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: done
Development

Successfully merging this pull request may close these issues.

2 participants