CML
    Preparing search index...

    Function getSvtaErrorIndex

    • Get the error index of an SVTA error code, per the spec's code mod 1000 rule. The index identifies the specific error within its category: native indices are 0-99, embedded external codes (HTTP, VAST) are 100-999.

      Parameters

      • code: number

        An SVTA error code.

      Returns number | undefined

      The error index within the code's category, or undefined if the code is not a non-negative integer.

      const index = getSvtaErrorIndex(SvtaNetworkErrorCode.RESOURCE_NOT_FOUND)

      assert(index === 4)