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

fix: log message errors as info instead of debug #520

Merged
merged 1 commit into from
Jul 15, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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