For sd_ble_gatts_service_changed() you can have a look at ble_gatts.h:
* @retval ::NRF_SUCCESS Successfully queued the Service Changed indication for transmission.
* @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle.
* @retval ::NRF_ERROR_NOT_SUPPORTED Service Changed not enabled at initialization. See @ref
* sd_ble_cfg_set and @ref ble_gatts_cfg_service_changed_t.
* @retval ::NRF_ERROR_INVALID_STATE One or more of the following is true:
* - Invalid Connection State
* - Notifications and/or indications not enabled in the CCCD
* - An ATT_MTU exchange is ongoing
* @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.
For sd_ble_gatts_service_changed() you can have a look at ble_gatts.h:
* @retval ::NRF_SUCCESS Successfully queued the Service Changed indication for transmission.
* @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle.
* @retval ::NRF_ERROR_NOT_SUPPORTED Service Changed not enabled at initialization. See @ref
* sd_ble_cfg_set and @ref ble_gatts_cfg_service_changed_t.
* @retval ::NRF_ERROR_INVALID_STATE One or more of the following is true:
* - Invalid Connection State
* - Notifications and/or indications not enabled in the CCCD
* - An ATT_MTU exchange is ongoing
* @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.