fix: Prevent Discarded unknown attribute error by using known attributes in breadcrumbs (#1638)
This commit is contained in:
parent
3ed92b3411
commit
d43d176aec
7 changed files with 14 additions and 11 deletions
|
|
@ -462,8 +462,11 @@ class Choreographer {
|
|||
} catch (err, stack) {
|
||||
debugger(when: kDebugMode);
|
||||
Sentry.addBreadcrumb(
|
||||
Breadcrumb.fromJson(
|
||||
{"igcTextData": igc.igcTextData?.toJson(), "offset": cursorOffset},
|
||||
Breadcrumb(
|
||||
data: {
|
||||
"igcTextData": igc.igcTextData?.toJson(),
|
||||
"offset": cursorOffset,
|
||||
},
|
||||
),
|
||||
);
|
||||
ErrorHandler.logError(
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class Requests {
|
|||
),
|
||||
);
|
||||
Sentry.addBreadcrumb(
|
||||
Breadcrumb.fromJson({"body": body, "objectId": objectId}),
|
||||
Breadcrumb(data: {"body": body, "objectId": objectId}),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class PangeaAnyState {
|
|||
]) {
|
||||
if (_layerLinkAndKeys[transformTargetId] == null) {
|
||||
if (throwErrorIfNotThere) {
|
||||
Sentry.addBreadcrumb(Breadcrumb.fromJson(_layerLinkAndKeys));
|
||||
Sentry.addBreadcrumb(Breadcrumb(data: _layerLinkAndKeys));
|
||||
throw Exception("layerLinkAndKey with null for $transformTargetId");
|
||||
} else {
|
||||
_layerLinkAndKeys[transformTargetId] =
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class ErrorHandler {
|
|||
if (m != null) debugPrint("error message: $m");
|
||||
}
|
||||
|
||||
Sentry.addBreadcrumb(Breadcrumb.fromJson(data));
|
||||
Sentry.addBreadcrumb(Breadcrumb(data: data));
|
||||
debugPrint(data.toString());
|
||||
|
||||
Sentry.captureException(
|
||||
|
|
|
|||
|
|
@ -127,16 +127,16 @@ class RepresentationEvent {
|
|||
|
||||
if (_event == null && timestamp.isAfter(DateTime(2024, 9, 25))) {
|
||||
Sentry.addBreadcrumb(
|
||||
Breadcrumb.fromJson({
|
||||
'message':
|
||||
Breadcrumb(
|
||||
message:
|
||||
'representation with no _event and no tokens got tokens directly. This means an original_sent with no tokens. This should not happen in messages sent after September 25',
|
||||
'data': {
|
||||
data: {
|
||||
'content': content.toJson(),
|
||||
'event': _event?.toJson(),
|
||||
'timestamp': timestamp.toIso8601String(),
|
||||
'senderID': senderID,
|
||||
},
|
||||
}),
|
||||
),
|
||||
);
|
||||
}
|
||||
final List<PangeaToken> res =
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ extension EventsRoomExtension on Room {
|
|||
required String type,
|
||||
}) async {
|
||||
try {
|
||||
Sentry.addBreadcrumb(Breadcrumb.fromJson(content));
|
||||
Sentry.addBreadcrumb(Breadcrumb(data: content));
|
||||
if (parentEventId.contains("web")) {
|
||||
debugger(when: kDebugMode);
|
||||
Sentry.addBreadcrumb(
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class ConstructIdentifier {
|
|||
|
||||
if (type == null) {
|
||||
Sentry.addBreadcrumb(Breadcrumb(message: "type is: ${json['type']}"));
|
||||
Sentry.addBreadcrumb(Breadcrumb.fromJson(json));
|
||||
Sentry.addBreadcrumb(Breadcrumb(data: json));
|
||||
throw Exception("Matching construct type not found");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue