replayError.ts 597 B

12345678910111213141516
  1. import type {ReplayError as TReplayError} from 'sentry/views/replays/types';
  2. export function ReplayError(
  3. error: Partial<TReplayError> & Pick<TReplayError, 'id' | 'issue' | 'timestamp'>
  4. ): TReplayError {
  5. return {
  6. 'error.type': error['error.type'] ?? ([] as string[]),
  7. 'error.value': error['error.value'] ?? ([] as string[]),
  8. id: error.id,
  9. issue: error.issue,
  10. 'issue.id': error['issue.id'] ?? 3740335939,
  11. 'project.name': error['project.name'] ?? 'javascript',
  12. timestamp: error.id,
  13. title: error.title ?? 'A Redirect with :orgId param on customer domain',
  14. };
  15. }