2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-12 10:15:32 +00:00

Add extra context information to sentry error reports

- Should help to track down bugs where stacktrace is missing information
- Adds some more error catching, too
This commit is contained in:
Oliver Walters
2022-05-12 22:46:12 +10:00
parent e47d88a4bb
commit c90a849a5a
5 changed files with 69 additions and 13 deletions

View File

@ -788,7 +788,14 @@ Map<String, dynamic> extractFieldDefinition(Map<String, dynamic> data, String lo
print(error.toString());
// Report the error
sentryReportError(error, stackTrace);
sentryReportError(
"apiForm.extractFieldDefinition : path traversal",
error, stackTrace,
context: {
"path": path.toString(),
"el": el,
}
);
return {};
}
}
@ -808,7 +815,13 @@ Map<String, dynamic> extractFieldDefinition(Map<String, dynamic> data, String lo
print(error.toString());
// Report the error
sentryReportError(error, stacktrace);
sentryReportError(
"apiForm.extractFieldDefinition : as map",
error, stacktrace,
context: {
"el": el.toString(),
}
);
return {};
}