GATTS_SendErrorResponse
C
uint16_t GATTS_SendErrorResponse(uint16_t connHandle, GATTS_SendErrRespParams_T *p_errParams);Description
GATT Server sends an error response. This API should be called when a request event is received by the application. The request is not processed by the GATT server.
For example, This API may be called after Application receives Write Request event (GATTS_EVT_WRITE) but request cannot be processed as the attribute value does not have Write permission.
Parameters
| Parameter | Description | 
|---|---|
| [in] connHandle | Handle of the connection to send the error response. | 
| [in] p_errParams | Pointer to Error Response parameters. See GATTS_SendErrRespParams_T. | 
Return values
| Return value | Description | 
|---|---|
| MBA_RES_SUCCESS | Successfully initiates an error response. | 
| MBA_RES_FAIL | Operation is not permitted. The error response is not for the received request. i.e. The reqOpcode field in the GATTS_SendErrRespParams_T is the matched to the receiving request. | 
| MBA_RES_OOM | Internal memory allocation failure. | 
| MBA_RES_INVALID_PARA | Invalid parameters. Connection handle is not valid. | 
