error.ts 551 B

1234567891011121314151617
  1. import type {RawReplayError as TRawReplayError} from 'sentry/utils/replays/types';
  2. type Overwrite<T, U> = Pick<T, Exclude<keyof T, keyof U>> & U;
  3. export function RawReplayError(
  4. error: Overwrite<Partial<TRawReplayError>, {timestamp: Date}>
  5. ): TRawReplayError {
  6. return {
  7. 'error.type': [] as string[],
  8. id: error.id ?? 'e123',
  9. issue: error.issue ?? 'JS-374',
  10. 'issue.id': 3740335939,
  11. 'project.name': 'javascript',
  12. timestamp: error.timestamp.toISOString(),
  13. title: 'A Redirect with :orgId param on customer domain',
  14. };
  15. }