Readonlycode: Exclude<URErrorCode, "UnexpectedType" | "InvalidParameter" | "TagUnnamed">A code that carries no payload.
Readonlycode: "UnexpectedType"The UR's type is not the one expected.
Readonlyexpected: stringThe type that was expected.
Readonlyfound: stringThe type the UR carries.
Readonlycode: "InvalidParameter"An argument outside its domain (JS-only): a wrong type, or a number or bigint outside its width.
Readonlyparameter: stringThe argument, e.g. "maxFragmentLength".
Readonlyvalue: unknownThe value received (the length for shortIdentifier's data, the index for mixFragments).
Readonlycode: "TagUnnamed"A dcbor tag without a registered name cannot name a UR type (JS-only).
Readonlytag: TagValue | undefinedThe tag's number; undefined when the codec has no tag at all.
The structured payload of a URError, discriminated by
code:e.details.code === "UnexpectedType"narrows to{ expected, found }.