handle json parsing error for empty return body

a 404 message can be returned from the server without having a message in it (when deleting from an index with key, value and id and an empty string is contained in the value)