#include <include/net/nrf_cloud_codec.h>
Check for a JSON error message in the data received from nRF Cloud over MQTT.
- Parameters
-
| [in] | buf | Data received from nRF Cloud. |
| [in] | app_id | appId value to check for. Set to NULL to skip appID check. |
| [in] | msg_type | messageType value to check for. Set to NULL to skip messageType check. |
| [out] | err | Error code found in message. |
- Return values
-
| 0 | Error code found (and matched app_id and msg_type if provided). |
| -ENOENT | Error code found, but did not match specified the app_id and msg_type. |
| -ENOMSG | No error code found. |
| -EBADMSG | Invalid error code data format. |
| -ENODATA | JSON data was not found. |
- Returns
- A negative value indicates an error.