20#include <system_error>
24#ifndef COUCHBASE_CXX_CLIENT_DOXYGEN
27const std::error_category&
28common_category() noexcept;
30const std::error_category&
31key_value_category() noexcept;
33const std::error_category&
34query_category() noexcept;
36const std::error_category&
37analytics_category() noexcept;
39const std::error_category&
40search_category() noexcept;
42const std::error_category&
43view_category() noexcept;
45const std::error_category&
46management_category() noexcept;
48const std::error_category&
49field_level_encryption_category() noexcept;
51const std::error_category&
52network_category() noexcept;
54const std::error_category&
55streaming_json_lexer_category() noexcept;
57const std::error_category&
58transaction_category() noexcept;
60const std::error_category&
61transaction_op_category() noexcept;
1152#ifndef COUCHBASE_CXX_CLIENT_DOXYGEN
1153inline std::error_code
1154make_error_code(common e)
noexcept
1156 return {
static_cast<int>(e), core::impl::common_category() };
1159inline std::error_code
1160make_error_code(key_value e)
1162 return {
static_cast<int>(e), core::impl::key_value_category() };
1165inline std::error_code
1166make_error_code(query e)
1168 return {
static_cast<int>(e), core::impl::query_category() };
1171inline std::error_code
1172make_error_code(search e)
1174 return {
static_cast<int>(e), core::impl::search_category() };
1177inline std::error_code
1178make_error_code(view e)
1180 return {
static_cast<int>(e), core::impl::view_category() };
1183inline std::error_code
1184make_error_code(analytics e)
1186 return {
static_cast<int>(e), core::impl::analytics_category() };
1189inline std::error_code
1190make_error_code(management e)
1192 return {
static_cast<int>(e), core::impl::management_category() };
1195inline std::error_code
1196make_error_code(network e)
1198 return {
static_cast<int>(e), core::impl::network_category() };
1201inline std::error_code
1202make_error_code(field_level_encryption e)
1204 return {
static_cast<int>(e), core::impl::field_level_encryption_category() };
1207inline std::error_code
1208make_error_code(streaming_json_lexer e)
1210 return {
static_cast<int>(e), core::impl::streaming_json_lexer_category() };
1213inline std::error_code
1214make_error_code(transaction e)
1216 return {
static_cast<int>(e), core::impl::transaction_category() };
1219inline std::error_code
1220make_error_code(transaction_op e)
1222 return {
static_cast<int>(e), core::impl::transaction_op_category() };
1229#ifndef COUCHBASE_CXX_CLIENT_DOXYGEN
1231struct std::is_error_code_enum<couchbase::errc::common> : std::true_type {
1235struct std::is_error_code_enum<couchbase::errc::key_value> : std::true_type {
1239struct std::is_error_code_enum<couchbase::errc::query> : std::true_type {
1243struct std::is_error_code_enum<couchbase::errc::analytics> : std::true_type {
1247struct std::is_error_code_enum<couchbase::errc::search> : std::true_type {
1251struct std::is_error_code_enum<couchbase::errc::view> : std::true_type {
1255struct std::is_error_code_enum<couchbase::errc::management> : std::true_type {
1259struct std::is_error_code_enum<couchbase::errc::field_level_encryption> : std::true_type {
1263struct std::is_error_code_enum<couchbase::errc::network> : std::true_type {
1267struct std::is_error_code_enum<couchbase::errc::streaming_json_lexer> : std::true_type {
1271struct std::is_error_code_enum<couchbase::errc::transaction> : std::true_type {
1275struct std::is_error_code_enum<couchbase::errc::transaction_op> : std::true_type {
transaction_op
Errors related to a failed transaction operation.
Definition error_codes.hxx:1120
@ active_transaction_record_not_found
@ active_transaction_record_entry_not_found
@ concurrent_operations_detected_on_same_document
@ transaction_already_committed
@ active_transaction_record_full
@ forward_compatibility_failure
@ transaction_aborted_externally
@ transaction_already_aborted
@ document_already_in_transaction
@ previous_operation_failed
key_value
Errors for related to Key/Value service (kv_engine)
Definition error_codes.hxx:366
@ path_exists
A sub-document operation which relies on a path not existing encountered a path which exists.
@ value_too_large
The value that was sent was too large to store (typically > 20MB)
@ xattr_unknown_virtual_attribute
A sub-document operation attempts to access an unknown virtual attribute.
@ document_not_locked
The document is already locked - generally returned when an unlocking operation is being performed.
@ value_too_deep
The value provided, if inserted into the document, would cause the document to become too deep for th...
@ xattr_unknown_macro
A macro was used which the server did not understand.
@ durable_write_re_commit_in_progress
The server is currently working to synchronize all replicas for previously performed durable operatio...
@ xattr_invalid_key_combo
A sub-document operation attempts to access multiple XATTRs in one operation.
@ path_too_deep
The document contains too many levels to parse.
@ document_not_found
Indicates an operation failed because the key does not exist.
@ path_mismatch
The path provided for a sub-document operation did not match the actual structure of the document.
@ cannot_revive_living_document
Only deleted document could be revived.
@ xattr_no_access
The user does not have permission to access the attribute.
@ durable_write_in_progress
A durable write is attempted against a key which already has a pending durable write.
@ document_locked
Returned when the server reports a temporary failure that is very likely to be lock-related (like an ...
@ durability_ambiguous
A sync-write has not completed in the specified time and has an ambiguous result – it may have succee...
@ path_not_found
The path provided for a sub-document operation was not found.
@ document_not_json
A sub-document operation is performed on a non-JSON document.
@ xattr_cannot_modify_virtual_attribute
A sub-document operation attempts to modify a virtual attribute.
@ number_too_big
The existing number is outside the valid range for arithmetic operations.
@ document_exists
An operation which relies on the document not existing fails because the document existed.
@ path_invalid
The path provided for a sub-document operation was not syntactically correct.
@ durability_impossible
The specified durability requirements are not currently possible (for example, there are an insuffici...
@ mutation_token_outdated
The provided mutation token is outdated compared to the current state of the server.
@ document_irretrievable
In collection::get_any_replica, the collection::get_all_replicas returns an empty stream because all ...
@ value_invalid
The value provided for a sub-document operation would invalidate the JSON structure of the document i...
@ delta_invalid
The delta value specified for an operation is too large.
@ durability_level_not_available
The specified durability level is invalid.
@ path_too_big
The path provided for a sub-document operation is too long, or contains too many independent componen...
field_level_encryption
Field-Level Encryption Error Definitions.
Definition error_codes.hxx:893
@ invalid_crypto_key
Raised by an encrypter or decrypter when the key does not meet expectations (for example,...
@ encrypter_not_found
Raised when a message cannot be encrypted because there is no encrypter registered under the requeste...
@ generic_cryptography_failure
Generic cryptography failure.
@ encryption_failure
Raised by CryptoManager encrypt when encryption fails for any reason.
@ crypto_key_not_found
Raised when a crypto operation fails because a required key is missing.
@ decryption_failure
Raised by CryptoManager.decrypt() when decryption fails for any reason.
@ decrypter_not_found
Raised when a message cannot be decrypted because there is no decrypter registered for the algorithm.
@ invalid_ciphertext
Raised when decryption fails due to malformed input, integrity check failure, etc.
search
Errors related to Search service (CBFT)
Definition error_codes.hxx:782
@ consistency_mismatch
Consistency constraints cannot be accepted by the server.
@ index_not_ready
The index referenced in the query is not ready yet.
view
Errors related to Views service (CAPI)
Definition error_codes.hxx:806
@ view_not_found
View does not exist on the server.
@ design_document_not_found
Design document does not exist on the server.
network
Errors related to networking IO.
Definition error_codes.hxx:972
@ resolve_failure
Unable to resolve node address.
@ handshake_failure
Failed to complete protocol handshake.
@ protocol_error
Unexpected protocol state or input.
@ no_endpoints_left
No hosts left to connect.
@ configuration_not_available
Configuration is not available for some reason.
@ cluster_closed
The cluster object has been explicitly closed, no requests allowed.
query
Errors related to Query service (N1QL)
Definition error_codes.hxx:657
@ planning_failure
Indicates an operation failed because there has been an issue with the query planner.
@ index_failure
Indicates an operation failed because there has been an issue with the query planner or similar.
@ dml_failure
This exception is raised when the server fails to execute a DML query.
@ prepared_statement_failure
Indicates an operation failed because there has been an issue with query prepared statements.
transaction
Errors related to a failed transaction.
Definition error_codes.hxx:1107
management
Errors related to management service (ns_server)
Definition error_codes.hxx:836
@ group_not_found
Raised from the user management API.
@ eventing_function_compilation_failure
Occurs when the compilation of the function code failed name is "ERR_HANDLER_COMPILATION".
@ eventing_function_identical_keyspace
Occurs when source and metadata keyspaces are the same.
@ bucket_not_flushable
Raised from the bucket management API.
@ eventing_function_paused
Occurs when a function is paused but the action does not expect it to name is "ERR_APP_PAUSED".
@ eventing_function_not_bootstrapped
Occurs when a function is deployed but not “fully” bootstrapped name is "ERR_APP_NOT_BOOTSTRAPPED".
@ eventing_function_deployed
Occurs when a function is deployed but the action does not expect it to name is "ERR_APP_NOT_UNDEPLOY...
@ eventing_function_not_deployed
Occurs if the function is not deployed, but the action expects it to name is "ERR_APP_NOT_DEPLOYED".
@ user_not_found
Raised from the user management API.
@ collection_exists
Raised from the collection management API.
@ eventing_function_not_found
Occurs if the function is not found name is "ERR_APP_NOT_FOUND_TS".
@ scope_exists
Raised from the collection management API.
@ user_exists
Raised from the user management API.
@ bucket_exists
Raised from the bucket management API.
analytics
Errors related to Analytics service (CBAS)
Definition error_codes.hxx:702
@ link_not_found
The link referenced in the query is not found on the server.
@ job_queue_full
Indicates the analytics server job queue is full.
@ dataset_not_found
The dataset referenced in the query is not found on the server.
@ link_exists
The link referenced in the query is found on the server, when it should not be.
@ dataverse_not_found
The dataverse referenced in the query is not found on the server.
@ dataverse_exists
The dataverse referenced in the query is found on the server, when it should not be.
@ dataset_exists
The dataset referenced in the query is found on the server, when it should not be.
@ compilation_failure
The query failed to compile.
streaming_json_lexer
Errors related to streaming JSON parser.
Definition error_codes.hxx:1070
@ json_pointer_duplicated_slash
@ unicode_escape_is_too_short
@ root_does_not_match_json_pointer
@ string_outside_container
@ json_pointer_missing_root
common
Common errors for all services and modules.
Definition error_codes.hxx:74
@ bucket_not_found
A request is made but the current bucket is not found.
@ cas_mismatch
Indicates an optimistic locking failure.
@ service_not_available
It can be determined from the config unambiguously that a given service is not available.
@ encoding_failure
Returned when encoding of a user object failed while trying to write it to the cluster.
@ internal_server_failure
Indicates an operation failed because there has been an internal error in the server.
@ temporary_failure
Returned when the server reports a temporary failure.
@ decoding_failure
Returned when decoding of the data into the user object failed.
@ unambiguous_timeout
A timeout occurs and we are confident that the operation could not have succeeded.
@ rate_limited
This error is raised if the operation failed due to hitting a rate-limit on the server side.
@ ambiguous_timeout
A timeout occurs and we aren't sure if the underlying operation has completed.
@ collection_not_found
A request is made but the current collection (including scope) is not found.
@ scope_not_found
A management API attempts to target a scope which does not exist.
@ index_not_found
The index that was referenced by the operation does not exist on the server.
@ feature_not_available
A feature which is not available was used.
@ index_exists
The index that was referenced by the operation exist on the server when it expected not to.
@ unsupported_operation
The server indicates that the operation is not supported.
@ authentication_failure
Indicates authentication problems.
@ parsing_failure
Indicates an operation failed because parsing of the input returned with an error.
@ invalid_argument
It is unambiguously determined that the error was caused because of invalid arguments from the user.
@ quota_limited
This error is raised if the operation failed due to hitting a quota-limit on the server side.
@ request_canceled
A request is cancelled and cannot be resolved in a non-ambiguous way.
Represents a single item from the result of collection::scan()
Definition allow_querying_search_index_options.hxx:28