Azure Search SDK throws CloudException if the underlying HTTP request fails, however, during indexing the SDK will throw IndexBatchException.
Note, you can use the SetRetryPolicy method on the SearchIndexClient to customize how it behaves in when Azure Search returns a 5xx or 408.