send back json on invalid syntax errors