Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
fix: log message errors as info instead of debug
Browse files Browse the repository at this point in the history
Previously, several error classes were not logged as they were debug
level, not info level. This fix remedies that.

Closes #518
  • Loading branch information
bbangert committed Jul 15, 2016
1 parent 2540a4c commit ccc2d68
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions autopush/endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,34 +273,34 @@ def _router_fail_err(self, fail):
def _uaid_not_found_err(self, fail):
"""errBack for uaid lookup not finding the user"""
fail.trap(ItemNotFound)
self.log.debug(format="UAID not found in AWS.",
status_code=410, errno=103,
**self._client_info)
self.log.info(format="UAID not found in AWS.",
status_code=410, errno=103,
**self._client_info)
self._write_response(410, 103)

def _token_err(self, fail):
"""errBack for token decryption fail"""
fail.trap(InvalidToken, InvalidTokenException)
self.log.debug(format="Invalid token",
status_code=400, errno=102,
**self._client_info)
self.log.info(format="Invalid token",
status_code=400, errno=102,
**self._client_info)
self._write_response(400, 102)

def _auth_err(self, fail):
"""errBack for invalid auth token"""
fail.trap(VapidAuthException)
self.log.debug(format="Invalid Auth token",
status_code=401,
errno=109,
**self._client_info)
self.log.info(format="Invalid Auth token",
status_code=401,
errno=109,
**self._client_info)
self._write_unauthorized_response(message=fail.value.message)

def _chid_not_found_err(self, fail):
"""errBack for unknown chid"""
fail.trap(ItemNotFound, ValueError)
self.log.debug(format="CHID not found in AWS.",
status_code=410, errno=106,
**self._client_info)
self.log.info(format="CHID not found in AWS.",
status_code=410, errno=106,
**self._client_info)
self._write_response(410, 106)

#############################################################
Expand Down

0 comments on commit ccc2d68

Please sign in to comment.