import type { Observable, RawError } from '@openobserve/browser-core' import { initReportObservable, RawReportType } from '@openobserve/browser-core' import type { RumConfiguration } from '../configuration' export function trackReportError(configuration: RumConfiguration, errorObservable: Observable) { const subscription = initReportObservable(configuration, [ RawReportType.cspViolation, RawReportType.intervention, ]).subscribe((rawError) => errorObservable.notify(rawError)) return { stop: () => { subscription.unsubscribe() }, } }