---
title: "Error handling"
description: "Learn how to handle errors in the Aerospike C# client using AerospikeException and specific error types."
---

# Error handling

> For the complete documentation index see: [llms.txt](https://aerospike.com/docs/llms.txt)
> 
> All documentation pages available in markdown.

If an error occurs as a result of a database operation, an `AerospikeException` is thrown.

The `AerospikeException` `resultCode` field describes the exact cause of the error given by the Aerospike server.

Other client-side error conditions are:

-   `AerospikeException.QueryTerminated` — Query prematurely terminated.
-   `AerospikeException.Connection` — Client can’t connect to the server.
-   `AerospikeException.Timeout` — Database request expired before completing.