Skip to content

Commit

Permalink
feat(eventtypes): Keep value retained for synthetic errors (#12355)
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko authored Mar 18, 2019
1 parent 6f82f09 commit 1b520d1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/sentry/eventtypes/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,14 @@ def get_metadata(self, data):
return {}

loc = get_crash_location(exception, data.get('platform'))
rv = {}
rv = {
'value': trim(get_path(exception, 'value', default=''), 1024),
}

# If the exception mechanism indicates a synthetic exception we do not
# want to record the type and value into the metadata.
if not get_path(exception, 'mechanism', 'synthetic'):
rv.update({
'type': trim(get_path(exception, 'type', default='Error'), 128),
'value': trim(get_path(exception, 'value', default=''), 1024),
})
rv['type'] = trim(get_path(exception, 'type', default='Error'), 128)

# Attach crash location if available
if loc is not None:
Expand Down

0 comments on commit 1b520d1

Please sign in to comment.