should we return a json error?