AnalyticsErrorReport Structure

public struct AnalyticsErrorReport

A value type describing an error event to be sent to the analytics backend.

Use this type to encapsulate the error code, human‑readable message, optional contextual metadata, and severity. Instances are typically created in error handling paths and forwarded via filterOutgoingErrorReport.

  • Numeric identifier that categorizes the error.

    Declaration

    Swift

    public let code: Int
  • Human‑readable description of the error.

    Declaration

    Swift

    public let message: String
  • Additional key–value pairs that provide context (e.g., player ID, URL).

    Declaration

    Swift

    public let metadata: [String : String]
  • Severity level of the error used for prioritization.

    Declaration

    Swift

    public let severity: ErrorSeverity
  • Creates a new analytics error report.

    Declaration

    Swift

    public init(code: Int, message: String, metadata: [String : String], severity: ErrorSeverity)

    Parameters

    code

    Numeric identifier that categorizes the error.

    message

    Human‑readable description of the error.

    metadata

    Additional key–value pairs that provide context.

    severity

    Severity level of the error used for prioritization.