Skip to content

fix(errors): group catch-all captures by error type - #1183

Merged
bmc08gt merged 2 commits into
mainfrom
fix/bugsnag-error-type-grouping
Oct 31, 2026
Merged

bmc08gt merged 2 commits into
mainfrom
fix/bugsnag-error-type-grouping

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

Bugsnag group 6a7b33b (receiveCashLink, 411 events) holds eight error types. Catch-all captures that pass no id: group on #fileID:#function only, so every error thrown in one function lands in one group. This is Decision 4 (iOS half) in docs/specs/bugsnag-cleanup.md, from the triage brief .claude/plans/2026-10-30-bugsnag-6a7b33b.md on docs/bugsnag-cleanup-triage.

The fold is in ErrorReporting.capture, not at the call sites. A new ErrorReporting.groupingHash appends the error's type and value when id: is nil, so every existing catch-all gets split without editing each one. An explicit id: still replaces it, so sites that already pick their own id keep their current groups.

Associated values do split groups: grpcStatus(13) and grpcStatus(14) get different hashes. ErrorSubmitIntent prints the status code, and INTERNAL and UNAVAILABLE are different problems. This matches the event title, which already uses "\(error)". The cost is that an error whose description embeds free-form text would fragment into one group per message. I did not audit every error type for that.

Severities are unchanged: ErrorFetchBalance.notFound stays .info and transient RPC errors stay suppressed. Existing catch-all groups will start fresh on the first release with this change, so old groups need closing as superseded.

ErrorReportingGroupingTests covers different types, same error, differing associated values, different functions, and explicit id:.

@bmc08gt bmc08gt self-assigned this Oct 31, 2026
@bmc08gt
bmc08gt merged commit f4b1ad2 into main Oct 31, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant