.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Search::Elasticsearch::Error 3pm" .TH Search::Elasticsearch::Error 3pm 2024-02-04 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Search::Elasticsearch::Error \- Errors thrown by Search::Elasticsearch .SH VERSION .IX Header "VERSION" version 8.12 .SH DESCRIPTION .IX Header "DESCRIPTION" Errors thrown by Search::Elasticsearch are error objects, which can include a stack trace and information to help debug problems. An error object consists of the following: .PP .Vb 6 \& { \& type => $type, # eg Missing \& text => \*(AqError message\*(Aq, \& vars => {...}, # vars which may help to explain the error \& stack => [...], # a stack trace \& } .Ve .PP The \f(CW$Search::Elasticsearch::Error::DEBUG\fR variable can be set to \f(CW1\fR or \f(CW2\fR to increase the verbosity of errors. .PP Error objects stringify to a human readable error message when used in text context (for example: \f(CW\*(C`print \*(AqOh no! \*(Aq.$error\*(C'\fR). They also support the \f(CW\*(C`TO_JSON\*(C'\fR method to support conversion to JSON when "convert_blessed" in JSON is enabled. .SH "ERROR CLASSES" .IX Header "ERROR CLASSES" The following error classes are defined: .IP \(bu 4 \&\f(CW\*(C`Search::Elasticsearch::Error::Param\*(C'\fR .Sp A bad parameter has been passed to a method. .IP \(bu 4 \&\f(CW\*(C`Search::Elasticsearch::Error::Request\*(C'\fR .Sp There was some generic error performing your request in Elasticsearch. This error is triggered by HTTP status codes \f(CW400\fR and \f(CW500\fR. This class has the following sub-classes: .RS 4 .IP \(bu 4 \&\f(CW\*(C`Search::Elasticsearch::Error::Unauthorized\*(C'\fR .Sp Invalid (or no) username/password provided as \f(CW\*(C`userinfo\*(C'\fR for a password protected service. These errors are triggered by the \f(CW401\fR HTTP status code. .IP \(bu 4 \&\f(CW\*(C`Search::Elasticsearch::Error::Missing\*(C'\fR .Sp A resource that you requested was not found. These errors are triggered by the \f(CW404\fR HTTP status code. .IP \(bu 4 \&\f(CW\*(C`Elastisearch::Error::Conflict\*(C'\fR .Sp Your request could not be performed because of some conflict. For instance, if you try to delete a document with a particular version number, and the document has already changed, it will throw a \f(CW\*(C`Conflict\*(C'\fR error. If it can, it will include the \f(CW\*(C`current_version\*(C'\fR in the error vars. This error is triggered by the \f(CW409\fR HTTP status code. .IP \(bu 4 \&\f(CW\*(C`Search::Elasticsearch::Error::ContentLength\*(C'\fR .Sp The request body was longer than the max_content_length. .IP \(bu 4 \&\f(CW\*(C`Search::Elasticsearch::Error::RequestTimeout\*(C'\fR .Sp The request took longer than the specified \f(CW\*(C`timeout\*(C'\fR. Currently only applies to the cluster_health request. .RE .RS 4 .RE .IP \(bu 4 \&\f(CW\*(C`Search::Elasticsearch::Error::Timeout\*(C'\fR .Sp The request timed out. .IP \(bu 4 \&\f(CW\*(C`Search::Elasticsearch::Error::Cxn\*(C'\fR .Sp There was an error connecting to a node in the cluster. This error indicates node failure and will be retried on another node. This error has the following sub-classes: .RS 4 .IP \(bu 4 \&\f(CW\*(C`Search::Elasticsearch::Error::Unavailable\*(C'\fR .Sp The current node is unable to handle your request at the moment. Your request will be retried on another node. This error is triggered by the \f(CW503\fR HTTP status code. .IP \(bu 4 \&\f(CW\*(C`Search::Elasticsearch::Error::BadGateway\*(C'\fR .Sp A proxy between the client and Elasticsearch is unable to connect to Elasticsearch. This error is triggered by the \f(CW502\fR HTTP status code. .IP \(bu 4 \&\f(CW\*(C`Search::Elasticsearch::Error::GatewayTimeout\*(C'\fR .Sp A proxy between the client and Elasticsearch is unable to connect to Elasticsearch within its own timeout. This error is triggered by the \f(CW504\fR HTTP status code. .IP \(bu 4 \&\f(CW\*(C`Search::Elasticsearch::Error::SSL\*(C'\fR .Sp There was a problem validating the SSL certificate. Not all backends support this error type. .RE .RS 4 .RE .IP \(bu 4 \&\f(CW\*(C`Search::Elasticsearch::Error::Forbidden\*(C'\fR .Sp Either the cluster was unable to process the request because it is currently blocking, eg there are not enough master nodes to form a cluster, or because the authenticated user is trying to perform an unauthorized action. This error is triggered by the \f(CW403\fR HTTP status code. .IP \(bu 4 \&\f(CW\*(C`Search::Elasticsearch::Error::Illegal\*(C'\fR .Sp You have attempted to perform an illegal operation. For instance, you attempted to use a Scroll helper in a different process after forking. .IP \(bu 4 \&\f(CW\*(C`Search::Elasticsearch::Error::Serializer\*(C'\fR .Sp There was an error serializing a variable or deserializing a string. .IP \(bu 4 \&\f(CW\*(C`Elasticsarch::Error::Internal\*(C'\fR .Sp An internal error occurred \- please report this as a bug in this module. .SH AUTHOR .IX Header "AUTHOR" Enrico Zimuel .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is Copyright (c) 2024 by Elasticsearch BV. .PP This is free software, licensed under: .PP .Vb 1 \& The Apache License, Version 2.0, January 2004 .Ve