NoDataError results in "Top level Sentry exception caught" error from raven
Closed this issue · 0 comments
say-yawn commented
About this Issue
On startup and refresh of the configuration on Shavar following trace-backs are seen in the log
Apr 15 21:59:29 ip-172-31-20-162.ec2.internal docker-shavar[3151]: Top level Sentry exception caught - failed creating log record
Apr 15 21:59:29 ip-172-31-20-162.ec2.internal docker-shavar[3151]: b'Skipping 72.0 version support for google-trackwhite-digest256 since the file does not exist in S3'
Apr 15 21:59:29 ip-172-31-20-162.ec2.internal docker-shavar[3151]: b'Traceback (most recent call last):
File "./shavar/lists.py", line 64, in add_versioned_lists_to_registry
list_._source.load()
File "./shavar/sources.py", line 161, in load
raise NoDataError(\'No chunk file found at "%s"\' % self.source_url)
shavar.exceptions.NoDataError: No chunk file found at "s3+file://net-mozaws-stage-shavar-lists/entity/72.0/google-trackwhite-digest256"
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/raven/handlers/logging.py", line 97, in emit
return self._emit(record)
File "/usr/local/lib/python3.7/site-packages/raven/handlers/logging.py", line 161, in _emit
handler_kwargs[\'formatted\'] = text_type(record.message)
AttributeError: \'LogRecord\' object has no attribute \'message\'
'
The "Top level Sentry exception" is raised when NoDataError is raised here and here which both call load()
in sources.py
. @rfk noted that
the default implementation of Formatter.format fills out the record.message field but the one in our JsonLogFormatter subclass does not.
Acceptance Criteria
- "Top level Sentry exception" does not happen
- NoDataError related logger.errors are logged properly