Errors

UaSDK. Errors

new Errors()

Errors possibly raised by the SDK; these are exported on the SDK object so an implementor may catch specific errors.

Example
const sdk = await UA

try {
  await sdk.register()
} catch (e) {
  if (e instanceof sdk.errors.UnsupportedContextError) {
    console.error('not a supported context', e)
  } else {
    throw e
  }
}

Classes

AnalyticsDisabledError
DataCollectionDisabledError
FeatureDisabledError
InvalidConfigurationError
InvalidValueError
ReportingDisabledError
UnsupportedContextError
UserDeniedPermissionError
ValidationError