triton2997 / cowin-slot-notifier

Utility that automatically alerts via email if slots are available on the CoWIN portal. Provides rich filtering by list of pincodes, type of vaccine, dose number, etc
0 stars 0 forks source link

[TASK]: Add exception handling to mailSender module #31

Closed triton2997 closed 3 years ago

triton2997 commented 3 years ago

Story: #14

Date: 22/07/2021

Description:

Add exception handling to mailSender module during the following actions:

  1. Session open
  2. Send mail Handle following errors:
  3. Connection error
  4. Timeout
  5. Bad credentials

Task type: Development

Estimated efforts (person hours): 3

Actual efforts (person hours):

triton2997 commented 3 years ago
  1. Added code to handle following exceptions while sending email: SMTPConnectError, SMTPAuthenticationError, SMTPHeloError, SMTPServerDisconnect
  2. Added functionality to retry on error. On failure after MAX_ERROR_LIMIT consecutive retries, module returns error
  3. Added code in main module to handle error returned
  4. Currently, main module simply prints the error
  5. This will be replaced by logging statement
triton2997 commented 3 years ago
  1. Added except block for TimeoutError thrown if port is incorrect
  2. Full testing of module complete