Represent invalid token error with its own type, not a code string