Error class thrown by the asynchronous SDK API when the Dynatrace RUM JavaScript is not available within the specified timeout, or the dynatrace namespace is overridden with an incompatible object.
dynatrace
import { sendEvent, DynatraceError } from '@dynatrace/rum-javascript-sdk/api/promises';try { await sendEvent({ 'event_properties.test': 'value' });} catch (error) { if (error instanceof DynatraceError) { console.error('RUM API Error:', error.message); }} Copy
import { sendEvent, DynatraceError } from '@dynatrace/rum-javascript-sdk/api/promises';try { await sendEvent({ 'event_properties.test': 'value' });} catch (error) { if (error instanceof DynatraceError) { console.error('RUM API Error:', error.message); }}
Optional
Error class thrown by the asynchronous SDK API when the Dynatrace RUM JavaScript is not available within the specified timeout, or the
dynatracenamespace is overridden with an incompatible object.Example