Skip to content

Commit d613a9e

Browse files
runningcodeclaude
andcommitted
ref(core): Narrow the client report attach catch to IOException
SentryEnvelopeItem.fromClientReport only throws IOException. The name is fully qualified so this PR doesn't touch the import block, where #6665 adds ExceptionUtils right next to it. Refs #5513 Refs JAVA-552 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 7c46714 commit d613a9e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎sentry/src/main/java/io/sentry/clientreport/ClientReportRecorder.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public ClientReportRecorder(@NotNull SentryOptions options) {
4646
items.add(SentryEnvelopeItem.fromClientReport(options.getSerializer(), clientReport));
4747

4848
return new SentryEnvelope(envelope.getHeader(), items);
49-
} catch (Throwable e) {
49+
} catch (java.io.IOException e) {
5050
options.getLogger().log(SentryLevel.ERROR, e, "Unable to attach client report to envelope.");
5151
return envelope;
5252
}

0 commit comments

Comments
 (0)