|
@@ -1,5 +1,7 @@
|
|
|
from __future__ import absolute_import
|
|
|
|
|
|
+from sentry.utils.safe import trim
|
|
|
+
|
|
|
from .base import BaseEvent
|
|
|
|
|
|
|
|
@@ -12,7 +14,8 @@ class ErrorEvent(BaseEvent):
|
|
|
def get_metadata(self):
|
|
|
exception = self.data['sentry.interfaces.Exception']['values'][0]
|
|
|
|
|
|
+ # in some situations clients are submitting non-string data for these
|
|
|
return {
|
|
|
- 'type': exception.get('type', 'Error'),
|
|
|
- 'value': exception.get('value', ''),
|
|
|
+ 'type': trim(exception.get('type', 'Error'), 128),
|
|
|
+ 'value': trim(exception.get('value', ''), 1024),
|
|
|
}
|