Skip to content

Using colon on Topic name cause Tokio panic #1800

Open
@hariangr

Description

@hariangr

This code

export const topicPostingCreated = new Topic<PostingCreatedEvent>("posting:created", {
  deliveryGuarantee: 'at-least-once'
})

cause this unfriendly error

thread '<unnamed>' panicked at runtimes/core/src/pubsub/nsq/sub.rs:40:65:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5

Changing that code into

export const topicPostingCreated = new Topic<PostingCreatedEvent>("posting-created", {
  deliveryGuarantee: 'at-least-once'
})

I believe a better error message should be used, and the error should never happen at the runtime dependency level (Tokio.rs)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions