UDF errors when called from client

The Aerospike Knowledge Base has moved to https://support.aerospike.com. Content on https://discuss.aerospike.com is being migrated to either https://support.aerospike.com or https://docs.aerospike.com. Maintenance on articles stored in this repository ceased on December 31st 2022 and this article may be stale. If you have any questions, please do not hesitate to raise a case via https://support.aerospike.com.

FAQ UDF error codes

Question

What do the error codes supplied to the Aerospike client when UDFs fail mean?

Answer

The error codes are as follows:

AS_PROTO_RESULT_FAIL_NOTFOUND - Error code 2

The record the UDF is looking for has not been found. This error can also be thrown when the UDF deletes the record and tries to access it later. Querying the record with AQL will confirm the validity of the error.

AS_PROTO_RESULT_FAIL_BIN_NAME - Error code 21

The requested record has been located but the bin the UDF is looking for within the record specified has not been found.

AS_PROTO_RESULT_FAIL_KEY_MISMATCH - Error code 19

This manifests only when the store_key option is enabled. The error indicates that the computed digest of the key the UDF is querying already exists, but that the corresponding stored key is different.

AS_PROTO_RESULT_FAIL_UNSUPPORTED_FEATURE - Error code 16

This occurs only when the single-bin and the data-in-memory or data-in-index storage patterns are enabled and the UDF tries to store the key.

AS_PROTO_RESULT_FAIL_COLLECTION_ITEM_NOT_FOUND - Error code 125

This error is specific to use of LDT (Large Datatype). The key queried does not exist in the LDT.

AS_PROTO_RESULT_FAIL_UDF_EXECUTION - Error code 100

This is a catch all error code used to denote any UDF error that is not described by the error codes listed above. To troubleshoot this error the server logging should be switched to ‘detail’ and the UDF call should be re-run to capture detail logging of the error. The server logs can be shared with Aerospike support for assistance.

Instructions on how to switch on detail logging at a server level are below. This should be switched off after any test due to the volume of log data that will be created.

http://www.aerospike.com/docs/operations/configure/log/

Notes

The error AS_PROTO_RESULT_FAIL_COLLECTION_ITEM_NOT_FOUND only occurs when using LDTs (large data types). LDTs are not considered a mature area of the Aerospike product and, as such, their usage is strongly discouraged. For an alternate means of achieving business logic without the use of LDTs, please contact your Solutions Architect, either directly or via Aerospike Support. +