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

Error handling #43

Open
daemon1024 opened this issue Oct 15, 2020 · 2 comments · May be fixed by #62
Open

Error handling #43

daemon1024 opened this issue Oct 15, 2020 · 2 comments · May be fixed by #62
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed telegram bot

Comments

@daemon1024
Copy link
Member

daemon1024 commented Oct 15, 2020

Describe the bug

There are lots of edge cases and instances where bot crashes due to some unexpected syntax or error.

Example : Unexpected syntax in /addmeetup

Expected behavior

The bot shouldn't crash instead it should respond with something like " Unexpected behaviour, please try again "

** Additional Context **

We are using log.Fatal / log.Fatalln when an error occurs. This causes the program to call os.exit(1) which is an undesirable behaviour.

Instead we should log.Print the errors as well as a bot response for the same.

@OgmaJ
Copy link

OgmaJ commented Nov 10, 2020

@daemon1024 : let me pick this one :

  • removing log.Fatal
  • convert log.Print & send a error message

@daemon1024
Copy link
Member Author

OgmaJ added a commit to OgmaJ/bots that referenced this issue Nov 10, 2020
 - remove fmt to log package for printing issue
OgmaJ added a commit to OgmaJ/bots that referenced this issue Nov 10, 2020
 - remove fmt to log package for printing issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed telegram bot
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants