Skip to content

Missing 'csp' in EventTypeΒ #17097

@Talb2005

Description

@Talb2005

Description:
CSP violation events reported by Sentry have event.type === 'csp', but the current EventType type in the SDK does not include 'csp'. This causes TypeScript errors when handling CSP events in beforeSend.

Reference:
EventType definition (line 69)

Proposed fix:
Add 'csp' to EventType:

export type EventType =
  | 'transaction'
  | 'profile'
  | 'replay_event'
  | 'feedback'
  | 'csp'
  | undefined;

Why:
The SDK emits CSP events with type: 'csp', so TypeScript definitions should accurately represent this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Waiting for: Community

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions