The single error class thrown by every helper in this package. Consumers
discriminate via err instanceof BytesError && err.code === '<code>'.
Collapsing this to one class with a code field (rather than one subclass
per failure mode) keeps the surface and tests small as new error modes
are added.
The single error class thrown by every helper in this package. Consumers discriminate via
err instanceof BytesError && err.code === '<code>'.Collapsing this to one class with a code field (rather than one subclass per failure mode) keeps the surface and tests small as new error modes are added.