Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add fallback for lambda
  • Loading branch information
nhulston committed May 19, 2025
commit c4a17c62c2511f47ebe0d36d1f0f14d0b03d8da1
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ private static void processSnapshotsAndSetTags(
int[] mapping = createThrowableMapping(currentEx, t);
StackTraceElement[] innerTrace = currentEx.getStackTrace();
int currentIdx = innerTrace.length - snapshot.getStack().size();

if (currentIdx < 0) {
// This means the innerTrace was truncated by the underlying environment.
// This is known to happen in AWS Lambda, but may also happen elsewhere.
currentIdx = i;
}

if (!sanityCheckSnapshotAssignment(snapshot, innerTrace, currentIdx)) {
continue;
}
Expand Down