When receiving an onion error, the spec says that we should verify it's no larger than 256 bytes.
But this is just a SHOULD, not a MUST, and it could be useful in the future to make this larger.
We currently don't support lengths greater than 256 byte, but this should be easy to change now on the reader side without creating any backwards-compatibility issue, and we will allow us to introduce bigger errors in the future once everyone supports reading them.
See lightning/bolts#1021 for more context.