# QESDK transaction status for Native APIs

Source: [https://docs.qualcomm.com/doc/80-PK177-134/topic/native_qesdk_class.html](https://docs.qualcomm.com/doc/80-PK177-134/topic/native_qesdk_class.html)

This class allows further flexibility for examining the Native API return values for specific error codes contained in [qesdk_error_t](https://docs.qualcomm.com/doc/80-PK177-134/topic/native_enums.html).
        Example code sections illustrate how `is_ok()` and `get_error_code()` can be used to accomplish this.

Note: This functionality is added in Gen 3 and will only be supported from Gen 3 onwards.

    class qesdk_transaction_status (qesdk_error_t error_code)Copy to clipboard

| Members | Description |
| --- | --- |
| qesdk\_transaction\_status | Class constructor |
| get\_error\_code() | Member function; returns qesdk\_error\_t enum |
| is\_ok() | Member function; indicates if NDK API transaction succeeded<br><br><br>                            <br>This API returns bool as true or false<br><br><br>                            <ul class="ul"><br>                                <li class="li">True: Successful and error code is SUCCESS</li><br><br>                                <li class="li">False: Failed and error code is not SUCCESS</li><br><br>                            </ul> |

## Example – Capturing Native API error codes and return values 

    qesdk_ndk_response = lceManager->setReportingCriteria(hyst, thresholds_down_vector, thresholds_up_vector, tech_type, period, setCriteriaStatusCallback, ret);
    if(qesdk_ndk_response.is_ok()){
    // Use the ret value
    } else {
    // Can get error code by get_error_code()
    }
    // The API’s return value is in ‘ret’ which should be interpreted as the output parameterCopy to clipboard

Use the `ret` parameter of Native API calls to infer the actual output API return values.

**Parent Topic:** [QESDK Native API](https://docs.qualcomm.com/doc/80-PK177-134/topic/native_api.html)

Last Published: Nov 14, 2024

[Previous Topic
QESDK event callback](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134/topics/native_fwk_event_callback.md) [Next Topic
QESDK Structs](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134/topics/native_structs.md)