# Defining errors

Each API function must specify a function return. The return codes can be whatever makes sense for the function. Use existing Natural Access error codes as much as possible. For example, generic error codes include CTAERR_OUT_OF_MEMORY, CTAERR_OUT_OF_RESOURCES, and CTAERR_BOARD_ERROR.

Generic error codes are provided in ctaerr.h.

tik service

- TIKERR_COMM_FAILURE

Error communicating with server.

- TIKERR_CHANNEL_NOT_OPENED

Server connection has not been established.

- TIKERR_OWNER_CONFLICT

Owner conflict for Natural Access context.

- TIKERR_UNKNOWN_SERVER_RESPONSE

Unknown server response.

- TIKERR_CAN_NOT_CONNECT

Cannot establish connection to server.