updateMetaWithError

Returns a copy of meta with its error field replaced by error.

Centralised because each concrete MetaData subtype is a different data class — the only way to flip a single field on an unknown subtype without losing the others is per-subtype copy(error = ...). The else arm returns the input unchanged, which is the right behaviour for any future MetaData type that hasn't been added to the when yet.