When should the error in the name or identity be raised by the accused?

The error should be raised before arraignment, or else it is deemed waived.