frontend actually expects a numeric value, but yes the error string must be reported as a json object somehow. I have not had a chance to see the frontend implementation thoroughly. Frontend guys must help here.