handle error with partial json