twitch-rs/twitch_api

Parsing event callback failed with "UnimplementedEvent" on mock API

LaylBongers opened this issue · 4 comments

On the line:

let event = Event::parse_http(&request).unwrap();

Relevant panic:

called `Result::unwrap()` on an `Err` value: UnimplementedEvent { version: "test", event_type: ChannelSubscribe }

Using the mock API command:

twitch event trigger subscribe -F https://localhost:3002/public/twitch/callback -s EVENTSUB_VERY_SECRET_CHANGE_ME

As a workaround, this will modify a request's headers to replace the "test" version with the expected "1":

if parts.headers["twitch-eventsub-subscription-version"] == "test" {
    parts
        .headers
        .insert("twitch-eventsub-subscription-version", "1".parse().unwrap());
}

this was fixed in twitchdev/twitch-cli#165 and included in 1.1.7, make sure you've updated your version.

Does upgrading twitch-cli work better?

Looks like the twitch bucket for scoop wasn't updated with 1.1.7 until 3 days ago, updated it and now it works, thanks!

Hi @LaylBongers,

Apologies for posting off-topic here, but this is the only way I know how to reach you. It appears you have the name "clockwork" registered on Crates.io. Would you potentially be interested in selling this package name? I would be happy to pay a fair sum for it. If so, please email me at nick@clockwork.xyz!

carbidegames/clockwork#2