-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I gave this package a quick look today, because I am going to use Syn in one of our Gleam projects that uses a cluster.
When I see it right, the following code makes an error check on "syn:publish" which actually never returns an error (docs). But it can raise and that is not caught here (and in a lot of other places). One may expect a function that returns a Result to not crash and actually gives back an error.
Lines 294 to 299 in 3207158
| // Publish the tagged message through syn | |
| case syn_publish(pubsub.scope, group, to_dynamic(message)) { | |
| Ok(_) -> Ok(Nil) | |
| Error(reason) -> | |
| Error(PublishFailed("publish failed: " <> string.inspect(reason))) | |
| } |
I did not find a test for this either. But I found error_handling_test() which actually does not test errors but tests if stuff is going through anyway. But that is nitpicking.
Do I misinterpret something or is that a result of AI code generation?
Metadata
Metadata
Assignees
Labels
No labels