# 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`.

- `code`

  Numeric identifier that categorizes the error.

  #### Declaration

  Swift

      public let code: Int

- `message`

  Human‑readable description of the error.

  #### Declaration

  Swift

      public let message: String

- `metadata`

  Additional key–value pairs that provide context (e.g., player ID, URL).

  #### Declaration

  Swift

      public let metadata: [String : String]

- `severity`

  Severity level of the error used for prioritization.

  #### Declaration

  Swift

      public let severity: ErrorSeverity

- `init(code:message:metadata:severity:)`

  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.