Skip to content
Closed
Changes from all commits
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
16 changes: 12 additions & 4 deletions models/SentryAppender.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,16 @@ component extends="coldbox.system.logging.AbstractAppender" accessors=true {
"detail"
)
) {
var additionalData = {};
if ( extraInfo.keyExists( "StackTrace" ) ) {
additionalData.stacktrace = extraInfo.StackTrace;
}
getProperty( "sentryService" ).captureException(
exception = extraInfo,
level = level,
message = message,
logger = loggerCat
exception = extraInfo,
level = level,
message = message,
logger = loggerCat,
additionalData = additionalData
);
} else if (
( isStruct( extraInfo ) || isObject( extraInfo ) )
Expand All @@ -62,6 +67,9 @@ component extends="coldbox.system.logging.AbstractAppender" accessors=true {
) {
var trimmedExtra = structCopy( extraInfo );
trimmedExtra.delete( "exception" );
if ( extraInfo.exception.keyExists( "StackTrace" ) ) {
trimmedExtra.stacktrace = extraInfo.exception.StackTrace;
}

getProperty( "sentryService" ).captureException(
exception = extraInfo.exception,
Comment on lines 74 to 75

Copilot AI Sep 22, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The additionalData parameter is missing from this captureException call. The trimmedExtra struct (which now includes the stacktrace) should be passed as additionalData to maintain consistency with the first exception handling path.

Copilot uses AI. Check for mistakes.
Expand Down
Loading