Map a structured AdCP error (code + message) to a typed ADCPError subclass
when the code has a dedicated class. Returns undefined for codes that
don't have a typed mapping — callers should continue to use the untyped
AdcpErrorInfo for those.
Pass the idempotencyKey the SDK sent so the constructed error carries it
for the caller's recovery logic. The server intentionally omits the key
from error bodies (it's a read-oracle), so the transport-layer caller is
the authoritative source.
Map a structured AdCP error (code + message) to a typed ADCPError subclass when the code has a dedicated class. Returns
undefinedfor codes that don't have a typed mapping — callers should continue to use the untypedAdcpErrorInfofor those.Pass the
idempotencyKeythe SDK sent so the constructed error carries it for the caller's recovery logic. The server intentionally omits the key from error bodies (it's a read-oracle), so the transport-layer caller is the authoritative source.