View | Details | Raw Unified | Return to bug 26312
Collapse All | Expand All

(-)a/Koha/Exceptions/Elasticsearch.pm (-1 / +1 lines)
Lines 25-31 use Exception::Class ( Link Here
25
    'Koha::Exceptions::Elasticsearch::BadResponse' => {
25
    'Koha::Exceptions::Elasticsearch::BadResponse' => {
26
        isa         => 'Koha::Exceptions::Elasticsearch',
26
        isa         => 'Koha::Exceptions::Elasticsearch',
27
        description => 'Bad response received when submitting request to Elasticsearch',
27
        description => 'Bad response received when submitting request to Elasticsearch',
28
        fields      => [ 'error', 'details' ]
28
        fields      => [ 'type', 'details' ]
29
    },
29
    },
30
    'Koha::Exceptions::Elasticsearch::MARCFieldExprParseError' => {
30
    'Koha::Exceptions::Elasticsearch::MARCFieldExprParseError' => {
31
        isa         => 'Koha::Exceptions::Elasticsearch',
31
        isa         => 'Koha::Exceptions::Elasticsearch',
(-)a/Koha/SearchEngine/Elasticsearch/Indexer.pm (-4 / +2 lines)
Lines 125-136 sub update_index { Link Here
125
                carp "One or more ElasticSearch errors occurred when indexing documents";
125
                carp "One or more ElasticSearch errors occurred when indexing documents";
126
            }
126
            }
127
        } catch {
127
        } catch {
128
            if( ref $_ eq 'Search::Elasticsearch::Error::Timeout' ){
129
            Koha::Exceptions::Elasticsearch::BadResponse->throw(
128
            Koha::Exceptions::Elasticsearch::BadResponse->throw(
130
                error => "Record commit failed.",
129
                type => $_->{type},
131
                details => "Timeout",
130
                details => $_->{text},
132
            );
131
            );
133
            }
134
        };
132
        };
135
    }
133
    }
136
    return $response;
134
    return $response;
(-)a/misc/search_tools/rebuild_elasticsearch.pl (-5 / +2 lines)
Lines 309-318 sub _do_reindex { Link Here
309
                _handle_response($response);
309
                _handle_response($response);
310
                _log( 1, "Commit complete\n" );
310
                _log( 1, "Commit complete\n" );
311
            } catch {
311
            } catch {
312
                if( ref $_ eq 'Koha::Exceptions::Elasticsearch::BadResponse'){
312
                _log(1,"Elasticsearch exception thrown: ".$_->type."\n");
313
                    _log(1,$_->{error});
313
                _log(2,"Details: ".$_->details."\n");
314
                    _log(2,$_->{details});
315
                }
316
            };
314
            };
317
            $commit_count  = $commit;
315
            $commit_count  = $commit;
318
            @id_buffer     = ();
316
            @id_buffer     = ();
319
- 

Return to bug 26312