Can we pass `codeUnit.error` directly if it is already an Error object?