fail gracefully on JSON.parse error in requests