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

Errors returned from Storage are ignored in the dispatcher #302

Closed
selevit opened this issue Oct 23, 2020 · 2 comments
Closed

Errors returned from Storage are ignored in the dispatcher #302

selevit opened this issue Oct 23, 2020 · 2 comments
Labels
K-bug Kind: bug

Comments

@selevit
Copy link
Collaborator

selevit commented Oct 23, 2020

A dispatching::dialogue::Storage interface has two methods – update_dialogue and remove_dialogue, which both return a Result.

This result should be handled in the dialogue dispatcher and in case of an error, at least some logs should be written to the stderr. Or maybe even do panic!() because it seems to be an unrecoverable problem, if the storage returns an error.

@selevit selevit added the K-bug Kind: bug label Oct 23, 2020
@selevit selevit self-assigned this Oct 23, 2020
@selevit selevit changed the title Errors returned from Storage are swallowed in DialogueDispatcher Errors returned from Storage are swallowed in the dispatcher Oct 23, 2020
@selevit selevit changed the title Errors returned from Storage are swallowed in the dispatcher Errors returned from Storage are ignored in the dispatcher Oct 23, 2020
@selevit selevit removed their assignment Oct 23, 2020
@WaffleLapkin
Copy link
Member

Error is ignored here:

if let Ok(Some(_)) = storage.update_dialogue(chat_id, new_dialogue).await {

@Hirrolot
Copy link
Collaborator

Hirrolot commented Apr 5, 2021

Closed by #356.

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

No branches or pull requests

3 participants