A newer version of this documentation is available.

View Latest

Handling errors

All methods available within the SDK will throw a CouchbaseException when encounting any form of error.

The CouchbaseException object will include a code property which can be used to quickly match and handle the error.

The most common errors that will occur should be errors relating to keys existing when they shouldn’t, or not existing when they should, in addition to these common errors, there are additionally a large number of connection or timeout related errors that can occur. For more information about these, see Handling timeouts.