@blockchaincommons/uniform-resources - v1.0.0-beta.3
    Preparing search index...
    URErrorDetails:
        | {
            code: Exclude<
                URErrorCode,
                "UnexpectedType"
                | "InvalidParameter"
                | "TagUnnamed",
            >;
        }
        | { code: "UnexpectedType"; expected: string; found: string }
        | { code: "InvalidParameter"; parameter: string; value: unknown }
        | { code: "TagUnnamed"; tag: TagValue | undefined }

    The structured payload of a URError, discriminated by code: e.details.code === "UnexpectedType" narrows to { expected, found }.

    Type Declaration

    • {
          code: Exclude<
              URErrorCode,
              "UnexpectedType"
              | "InvalidParameter"
              | "TagUnnamed",
          >;
      }
      • Readonlycode: Exclude<URErrorCode, "UnexpectedType" | "InvalidParameter" | "TagUnnamed">

        A code that carries no payload.

    • { code: "UnexpectedType"; expected: string; found: string }
      • Readonlycode: "UnexpectedType"

        The UR's type is not the one expected.

      • Readonlyexpected: string

        The type that was expected.

      • Readonlyfound: string

        The type the UR carries.

    • { code: "InvalidParameter"; parameter: string; value: unknown }
      • Readonlycode: "InvalidParameter"

        An argument outside its domain (JS-only): a wrong type, or a number or bigint outside its width.

      • Readonlyparameter: string

        The argument, e.g. "maxFragmentLength".

      • Readonlyvalue: unknown

        The value received (the length for shortIdentifier's data, the index for mixFragments).

    • { code: "TagUnnamed"; tag: TagValue | undefined }
      • Readonlycode: "TagUnnamed"

        A dcbor tag without a registered name cannot name a UR type (JS-only).

      • Readonlytag: TagValue | undefined

        The tag's number; undefined when the codec has no tag at all.