Skip to content

Commit 75c526f

Browse files
committed
rename variable
1 parent d8f97f4 commit 75c526f

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

packages/core/src/client.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,19 +1263,19 @@ export abstract class Client<O extends ClientOptions = ClientOptions> {
12631263

12641264
/** Updates existing session based on the provided event */
12651265
protected _updateSessionFromEvent(session: Session, event: Event): void {
1266-
// initially, set `crashed` based on the event level and update from exceptions if there are any later on
1267-
let crashed = event.level === 'fatal';
1266+
// initially, set `unhandled` based on the event level and update from exceptions if there are any later on
1267+
let unhandled = event.level === 'fatal';
12681268
let errored = false;
12691269
const exceptions = event.exception?.values;
12701270

12711271
if (exceptions) {
12721272
errored = true;
1273-
// reset crashed to false if there are exceptions, to ensure `mechanism.handled` is respected.
1274-
crashed = false;
1273+
// reset `unhandled` to false if there are exceptions, to ensure `mechanism.handled` is respected.
1274+
unhandled = false;
12751275

12761276
for (const ex of exceptions) {
12771277
if (ex.mechanism?.handled === false) {
1278-
crashed = true;
1278+
unhandled = true;
12791279
break;
12801280
}
12811281
}
@@ -1285,12 +1285,12 @@ export abstract class Client<O extends ClientOptions = ClientOptions> {
12851285
// 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update
12861286
// 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update
12871287
const sessionNonTerminal = session.status === 'ok';
1288-
const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);
1288+
const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && unhandled);
12891289

12901290
if (shouldUpdateAndSend) {
12911291
updateSession(session, {
1292-
...(crashed && { status: this._unhandledSessionStatus }),
1293-
errors: session.errors || Number(errored || crashed),
1292+
...(unhandled && { status: this._unhandledSessionStatus }),
1293+
errors: session.errors || Number(errored || unhandled),
12941294
});
12951295
this.captureSession(session);
12961296
}

0 commit comments

Comments
 (0)