user1252307 The answer is a great start, but on the watchdog side you get a relatively useless dictionary and stack trace.
If you are trying to view and track unexpected exceptions, try this small change in the log_sentry function:
from twisted.python import log from raven import Client client = Client(dsn='twisted+http://YOUR_DSN_HERE') def log_sentry(dictionary): if dictionary.get('isError'): if 'failure' in dictionary: client.captureException()
There may be a better way to filter the exception-based error message, and this may try to emit exception information that does not exist where there are errors that are not exceptions.
source share