Open VickiLanger opened 4 years ago
@VickiLanger we can send a report email in case of exception, and keep on restarting the server after a configurable amount of time.
@sroy8091 Yes, an email would work. That makes sense. I don't see why we couldn't restart the server until it works.
@VickiLanger can we put the specific status code
under except part?
@achoudh5 that seems like it would make sense. Honestly, I have not done any exception handling outside of some practice. So, I'm not sure what it normally looks like.
If I may ask, what I understood by tweet.py
and this error handling case is that after making sure the user enters their credentials right, it's taking some questions from a pool of questions and putting them as tweet right?
Yes. tweet.py
uses questions from files in questions_dir
Awesome! so, can we use an edge case file like if a user sends an empty
tweet or some tweets they wants to avoid but since it's automated they don't have any control over it?
Yes. That makes sense. An empty tweet definitely shouldn't happen.
Is that the only case you want to consider for now? I can create a PR for that if it's fine
That's the only thing I can think of. Go for it
Need to add exception handling to tweet.py
Don't forget to follow the bot on Twitter to see the hard work you put in.