According to some who thought long and hard about such matters, a grammatical error was a contradiction in terms (grammatical to them meant “having correct grammar” and so if it is an error it cannot be grammatical), and the preferred term should be an error in grammar.

