mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-10-30 14:49:14 +00:00
18 lines
623 B
TypeScript
18 lines
623 B
TypeScript
import type {RawReplayError} from 'sentry/utils/replays/types';
|
|
|
|
type Overwrite<T, U> = Pick<T, Exclude<keyof T, keyof U>> & U;
|
|
|
|
export function RawReplayErrorFixture(
|
|
error: Overwrite<Partial<RawReplayError>, {timestamp: Date}>
|
|
): RawReplayError {
|
|
return {
|
|
'error.type': error['error.type'] ?? ([] as string[]),
|
|
id: error.id ?? 'e123',
|
|
issue: error.issue ?? 'JS-374',
|
|
'issue.id': error['issue.id'] ?? 3740335939,
|
|
'project.name': error['project.name'] ?? 'javascript',
|
|
timestamp: error.timestamp.toISOString(),
|
|
title: error.title ?? 'A Redirect with :orgId param on customer domain',
|
|
};
|
|
}
|