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

The channel_history.rs example returns MalformedResponse. #78

Open
cedric-h opened this issue Sep 17, 2019 · 1 comment
Open

The channel_history.rs example returns MalformedResponse. #78

cedric-h opened this issue Sep 17, 2019 · 1 comment

Comments

@cedric-h
Copy link

If I get the code for a slack channel by copying a link to it and grabbing only the last part of the link, and then passing that code to the example, I don't get the error about it not being able to find a channel like I do if I pass anything else. Instead, I get an error about how the Slack API doesn't like the response that this crate is forming for it.

Err(MalformedResponse(Error("unknown variant `slackbot_response`, expected one of `standard`, `bot_message`, `channel_archive`,
`channel_join`, `channel_leave`, `channel_name`, `channel_purpose`, `channel_topic`, `channel_unarchive`, `file_comment`, `file_
mention`, `file_share`, `group_archive`, `group_join`, `group_leave`, `group_name`, `group_purpose`, `group_topic`, `group_unarc
hive`, `me_message`, `message_changed`, `message_deleted`, `message_replied`, `pinned_item`, `reply_broadcast`, `unpinned_item`"
, line: 1, column: 5466)))

Is there any way to see the JSON that's generated? I turned on logging all the way down to trace, and I got a ton of logs from tokio in particular, but not much else.

@dten
Copy link
Contributor

dten commented Sep 17, 2019

Thanks for the report. It seems that there are some message types which are unhandled. The original design doesn't handled any types other than what the library knows about so it's an error.
Slack don't version their API so new message types can just appear and cause issues for this very strict API. I feel like it needs an unknowns which just keeps the message blob but doesn't die. It should also handle any new types as they appear and this looks like a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants