Skip to content

Conversation

@mattjfan
Copy link
Owner

…rbose error message on exception, remove unused import in application.py

…rbose error message on exception, remove unused import in application.py
@mattjfan mattjfan requested a review from ChrisBarnes01 March 28, 2020 01:35
@mattjfan
Copy link
Owner Author

Changes

  • removed error re-raise and handling from send_push_message in push_notification.py
  • added more verbose error logging to send_push_message error catch in report_sickness.py
  • removed unused import application.py

Why

push_notification.py was calling undefined methods from the tutorial code, and referencing an undefined self property from global scope. In the case that an error was thrown from send_push_message, our code will run these undefined methods which will throw an error. I'm pretty sure since this whole thing is wrapped in a try catch block anyways, it doesn't crash the app, but I think it qualifies as unintended behavior. With the refactor, all errors thrown by exponent push methods are caught and logged without re-throwing, and the code can be simplified

Testing

@ChrisBarnes01 can you verify this still works as expected? You said you tested our push code previously so I figured it'd be easiest for you to verify.

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

Successfully merging this pull request may close these issues.

2 participants