ScyllaDB University Live | Free Virtual Training Event
Learn more
ScyllaDB Documentation Logo Documentation
  • Server
  • Cloud
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Download
ScyllaDB Docs Scylla C/C++ Driver API Documentation CassErrorResult

CassErrorResult¶

struct CassErrorResult¶

A error result of a request

Public Functions

void cass_error_result_free(const CassErrorResult *error_result)¶

Frees an error result instance.

Parameters:

error_result – [in]

CassError cass_error_result_code(const CassErrorResult *error_result)¶

Gets error code for the error result. This error code will always have an server error source.

Parameters:

error_result – [in]

Returns:

The server error code

CassConsistency cass_error_result_consistency(const CassErrorResult *error_result)¶

Gets consistency that triggered the error result of the following types:

  • CASS_ERROR_SERVER_READ_TIMEOUT

  • CASS_ERROR_SERVER_WRITE_TIMEOUT

  • CASS_ERROR_SERVER_READ_FAILURE

  • CASS_ERROR_SERVER_WRITE_FAILURE

  • CASS_ERROR_SERVER_UNAVAILABLE

Parameters:

error_result – [in]

Returns:

The consistency that triggered the error for a read timeout, write timeout or an unavailable error result. Undefined for other error result types.

cass_int32_t cass_error_result_responses_received(const CassErrorResult *error_result)¶

Gets the actual number of received responses, received acknowledgments or alive nodes for following error result types, respectively:

  • CASS_ERROR_SERVER_READ_TIMEOUT

  • CASS_ERROR_SERVER_WRITE_TIMEOUT

  • CASS_ERROR_SERVER_READ_FAILURE

  • CASS_ERROR_SERVER_WRITE_FAILURE

  • CASS_ERROR_SERVER_UNAVAILABLE

Parameters:

error_result – [in]

Returns:

The actual received responses for a read timeout, actual received acknowledgments for a write timeout or actual alive nodes for a unavailable error. Undefined for other error result types.

cass_int32_t cass_error_result_responses_required(const CassErrorResult *error_result)¶

Gets required responses, required acknowledgments or required alive nodes needed to successfully complete the request for following error result types, respectively:

  • CASS_ERROR_SERVER_READ_TIMEOUT

  • CASS_ERROR_SERVER_WRITE_TIMEOUT

  • CASS_ERROR_SERVER_READ_FAILURE

  • CASS_ERROR_SERVER_WRITE_FAILURE

  • CASS_ERROR_SERVER_UNAVAILABLE

Parameters:

error_result – [in]

Returns:

The required responses for a read time, required acknowledgments for a write timeout or required alive nodes for an unavailable error result. Undefined for other error result types.

cass_int32_t cass_error_result_num_failures(const CassErrorResult *error_result)¶

Gets the number of nodes that experienced failures for the following error types:

  • CASS_ERROR_SERVER_READ_FAILURE

  • CASS_ERROR_SERVER_WRITE_FAILURE

Parameters:

error_result – [in]

Returns:

The number of nodes that failed during a read or write request.

cass_bool_t cass_error_result_data_present(const CassErrorResult *error_result)¶

Determines whether the actual data was present in the responses from the replicas for the following error result types:

  • CASS_ERROR_SERVER_READ_TIMEOUT

  • CASS_ERROR_SERVER_READ_FAILURE

Parameters:

error_result – [in]

Returns:

cass_true if the data was present in the received responses when the read timeout occurred. Undefined for other error result types.

CassWriteType cass_error_result_write_type(const CassErrorResult *error_result)¶

Gets the write type of a request for the following error result types:

  • CASS_ERROR_SERVER_WRITE_TIMEOUT

  • CASS_ERROR_SERVER_WRITE_FAILURE

Parameters:

error_result – [in]

Returns:

The type of the write that timed out. Undefined for other error result types.

CassError cass_error_result_keyspace(const CassErrorResult *error_result, const char **keyspace, size_t *keyspace_length)¶

Gets the affected keyspace for the following error result types:

  • CASS_ERROR_SERVER_ALREADY_EXISTS

  • CASS_ERROR_SERVER_FUNCTION_FAILURE

Parameters:
  • error_result – [in]

  • keyspace – [out]

  • keyspace_length – [out]

Returns:

CASS_OK if successful, otherwise error occurred

CassError cass_error_result_table(const CassErrorResult *error_result, const char **table, size_t *table_length)¶

Gets the affected table for the already exists error (CASS_ERROR_SERVER_ALREADY_EXISTS) result type.

Parameters:
  • error_result – [in]

  • table – [out]

  • table_length – [out]

Returns:

CASS_OK if successful, otherwise error occurred

CassError cass_error_result_function(const CassErrorResult *error_result, const char **function, size_t *function_length)¶

Gets the affected function for the function failure error (CASS_ERROR_SERVER_FUNCTION_FAILURE) result type.

Requires Apache Cassandra: 2.2+

Parameters:
  • error_result – [in]

  • function – [out]

  • function_length – [out]

Returns:

CASS_OK if successful, otherwise error occurred

size_t cass_error_num_arg_types(const CassErrorResult *error_result)¶

Gets the number of argument types for the function failure error (CASS_ERROR_SERVER_FUNCTION_FAILURE) result type.

Requires Apache Cassandra: 2.2+

Parameters:

error_result – [in]

Returns:

The number of arguments for the affected function.

CassError cass_error_result_arg_type(const CassErrorResult *error_result, size_t index, const char **arg_type, size_t *arg_type_length)¶

Gets the argument type at the specified index for the function failure error (CASS_ERROR_SERVER_FUNCTION_FAILURE) result type.

Requires Apache Cassandra: 2.2+

Parameters:
  • error_result – [in]

  • index – [in]

  • arg_type – [out]

  • arg_type_length – [out]

Returns:

CASS_OK if successful, otherwise error occurred

Was this page helpful?

PREVIOUS
CassDataType
NEXT
CassExecProfile
  • Create an issue
  • Edit this page

On this page

  • CassErrorResult
    • CassErrorResult
      • CassErrorResult::cass_error_result_free()
      • CassErrorResult::cass_error_result_code()
      • CassErrorResult::cass_error_result_consistency()
      • CassErrorResult::cass_error_result_responses_received()
      • CassErrorResult::cass_error_result_responses_required()
      • CassErrorResult::cass_error_result_num_failures()
      • CassErrorResult::cass_error_result_data_present()
      • CassErrorResult::cass_error_result_write_type()
      • CassErrorResult::cass_error_result_keyspace()
      • CassErrorResult::cass_error_result_table()
      • CassErrorResult::cass_error_result_function()
      • CassErrorResult::cass_error_num_arg_types()
      • CassErrorResult::cass_error_result_arg_type()
Scylla C/C++ Driver
  • master
    • master
  • C/C++ Driver for ScyllaDB
  • API Documentation
    • CassAggregateMeta
    • CassAuthenticator
    • CassAuthenticatorCallbacks
    • CassBatch
    • CassCluster
    • CassCollection
    • CassColumnMeta
    • CassCustomPayload
    • CassDataType
    • CassErrorResult
    • CassExecProfile
    • CassFunctionMeta
    • CassFuture
    • CassIndexMeta
    • CassInet
    • CassIterator
    • CassKeyspaceMeta
    • CassLogMessage
    • CassMaterializedViewMeta
    • CassMetrics
    • CassNode
    • CassPrepared
    • CassResult
    • CassRetryPolicy
    • CassRow
    • CassSchemaMeta
    • CassSession
    • CassSpeculativeExecutionMetrics
    • CassSsl
    • CassStatement
    • CassTableMeta
    • CassTimestampGen
    • CassTuple
    • CassUserType
    • CassUuid
    • CassUuidGen
    • CassValue
    • CassVersion
    • DseDateRange
    • DseDateRangeBound
    • DseLineString
    • DseLineStringIterator
    • DsePolygon
    • DsePolygonIterator
  • Features
    • Basics
      • Batches
      • Binding Parameters
      • Client-side timestamps
      • Consistency
      • Data Types
      • The date and time Types
      • Futures
      • Handling Results
      • Keyspaces
      • Prepared Statements
      • Schema Metadata
      • Tuples
      • User-Defined Types (UDTs)
      • UUIDs
    • Building
    • Client Configuration
    • Cloud
    • Configuration
      • Retry policies
    • Execution Profiles
    • FAQ
    • Installation
    • Logging
    • Metrics
    • Scylla Specific Features
    • Security
      • SSL
    • Testing
      • Cassandra Cluster Manager (CCM)
    • Tracing
  • DSE Features
    • Authentication
    • Geospatial types
Docs Tutorials University Contact Us About Us
© 2025, ScyllaDB. All rights reserved. | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 28 April 2025.
Powered by Sphinx 7.4.7 & ScyllaDB Theme 1.8.6