NAME
OpenSearch::Client::Error - Errors thrown by OpenSearch::Client
VERSION
version 3.007004
DESCRIPTION
Errors thrown by OpenSearch::Client are error objects, which can include a stack trace and information to help debug problems. An error object consists of the following:
{
type => $type, # eg Missing
text => 'Error message',
vars => {...}, # vars which may help to explain the error
stack => [...], # a stack trace
}
The $OpenSearch::Client::Error::DEBUG variable can be set to 1 or 2 to increase the verbosity of errors.
Error objects stringify to a human readable error message when used in text context (for example: print 'Oh no! '.$error). They also support the TO_JSON method to support conversion to JSON when "convert_blessed" in JSON is enabled.
ERROR CLASSES
The following error classes are defined:
OpenSearch::Client::Error::ParamA bad parameter has been passed to a method.
OpenSearch::Client::Error::RequestThere was some generic error performing your request in OpenSearch. This error is triggered by HTTP status codes
400and500. This class has the following sub-classes:OpenSearch::Client::Error::UnauthorizedInvalid (or no) username/password provided as
userinfofor a password protected service. These errors are triggered by the401HTTP status code.OpenSearch::Client::Error::MissingA resource that you requested was not found. These errors are triggered by the
404HTTP status code.OpenSearch::Error::ConflictYour 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
Conflicterror. If it can, it will include thecurrent_versionin the error vars. This error is triggered by the409HTTP status code.OpenSearch::Client::Error::ContentLengthThe request body was longer than the max_content_length.
OpenSearch::Client::Error::RequestTimeoutThe request took longer than the specified
timeout. Currently only applies to the cluster_health request.
OpenSearch::Client::Error::TimeoutThe request timed out.
OpenSearch::Client::Error::CxnThere 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:
OpenSearch::Client::Error::UnavailableThe 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
503HTTP status code.OpenSearch::Client::Error::BadGatewayA proxy between the client and OpenSearch is unable to connect to OpenSearch. This error is triggered by the
502HTTP status code.OpenSearch::Client::Error::GatewayTimeoutA proxy between the client and OpenSearch is unable to connect to OpenSearch within its own timeout. This error is triggered by the
504HTTP status code.OpenSearch::Client::Error::SSLThere was a problem validating the SSL certificate. Not all backends support this error type.
OpenSearch::Client::Error::ForbiddenEither 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
403HTTP status code.OpenSearch::Client::Error::IllegalYou have attempted to perform an illegal operation. For instance, you attempted to use a Scroll helper in a different process after forking.
OpenSearch::Client::Error::SerializerThere was an error serializing a variable or deserializing a string.
OpenSearch::Error::InternalAn internal error occurred - please report this as a bug in this module.
MANUAL
Documentation index OpenSearch::Client::Manual
HISTORY
This distribution is derived from Search::Elasticsearch version 7.714. All subsequent changes are unique to this distribution.
AUTHOR
Mark Dootson <mdootson@cpan.org> ( current maintainer )
CREDITS
OpenSearch::Client is based on Search::Elasticsearch version 7.714 by Enrico Zimuel <enrico.zimuel@elastic.co>.
COPYRIGHT AND LICENSE
Copyright (C) 2026 by Mark Dootson ( this distribution )
Copyright (C) 2021 by Elasticsearch BV ( original distribution )
This is free software, licensed under:
The Apache License, Version 2.0, January 2004