/** * Structured signals extracted from an error, used to group it into a meaningful Bugsnag bucket. * * These are read from the *original* typed error (before it is flattened to a generic `Error` * for reporting), so we group on facts the error already carries rather than by re-parsing a * stringified message. */ interface ErrorGroupingSignals { httpStatus?: number; code?: string; errorClass?: string; } /** * The fully resolved grouping decision for an error: the Bugsnag grouping hash (or `undefined` to * fall back to stack-trace grouping), the semantic category, and the structured signals that drove * the decision. The reporter uses a single resolution for both `event.groupingHash` and the * `error_grouping` metadata so they can never disagree. */ interface ResolvedErrorGrouping { hash?: string; category?: string; signals: ErrorGroupingSignals; } /** * Extracts structured grouping signals from an error object. * * Only assigns a field when a value is actually present, so the result can be safely merged over * message-derived signals without an explicit `undefined` erasing a recovered value. * * @param error - The original error (any type). * @returns The HTTP status, GraphQL error code, and error class name when available. */ export declare function errorGroupingSignals(error: unknown): ErrorGroupingSignals; /** * Resolves the full grouping decision for an error: hash, category, and the signals behind it. * * Categories are resolved structured-first (HTTP status / GraphQL code), falling back to the * shared keyword categorizer only for untyped errors. When no meaningful category can be * resolved, `hash` is `undefined` so the caller leaves `event.groupingHash` unset and Bugsnag's * default stack-trace grouping applies — this avoids merging genuinely distinct unknown bugs. * * @param error - The original error (any type). * @param sliceName - The product slice (`app`, `theme`, `store`, `hydrogen`, or `cli`). * @returns The resolved hash (or `undefined`), category, and structured signals. */ export declare function resolveErrorGrouping(error: unknown, sliceName: string): ResolvedErrorGrouping; /** * Builds a Bugsnag grouping hash of the form `${slice}:${category}:${signature}`. * * Thin wrapper over {@link resolveErrorGrouping} for callers that only need the hash. * * @param error - The original error (any type). * @param sliceName - The product slice (`app`, `theme`, `store`, `hydrogen`, or `cli`). * @returns The grouping hash, or `undefined` to fall back to stack-trace grouping. */ export declare function errorGroupingHash(error: unknown, sliceName: string): string | undefined; export {};