/** * Config to use for any standard error we throw in Replo */ export type ReploErrorConfig = { /** * Message of the error, used only internally. If not provided, defaults to * the error's class name */ message?: string; /** * Any additional data about the error, e.g. ids of content that was trying * to be accessed, contextual variables, etc. This is included when the error * is logged to Sentry, etc */ additionalData?: Record; /** Meta details for error reporting */ errorReportingDetails?: { /** * If true, tells Sentry that it should group this error differently when * it happens on different endpoints ("transactions" in Sentry are endpoints) */ includeTransactionInFingerprint?: boolean; /** * If provided, these get added to the Sentry fingerprint for this error. Useful * for when you want to modify the grouping of an error, especially for reusing * errors in different places. */ customFingerprint?: string[]; }; /** * Original cause of the error (useful for if you need to catch and re-throw errors * with more context). Will be reported in stacktraces, sentry, etc. */ cause?: unknown; }; /** * Base error that all errors in Replo inherit from */ export declare abstract class ReploError extends Error { config: ReploErrorConfig; id: string; constructor(config: ReploErrorConfig); }