When trying to delete a document that is not present in the index, the process4xx() method in responses/Response throws an error "undefined index: error" when trying to retrieve the error from the responseData.
I created a DocumentMissingException which will be thrown in the process4xx() method when the responseData['found'] is false. This prevents the above error and allows us to catch the exception and handle it gracefully.
When trying to delete a document that is not present in the index, the process4xx() method in responses/Response throws an error "undefined index: error" when trying to retrieve the error from the responseData.
I created a DocumentMissingException which will be thrown in the process4xx() method when the responseData['found'] is false. This prevents the above error and allows us to catch the exception and handle it gracefully.