diff --git a/src/session/rx.c b/src/session/rx.c index c9590c46b..b99c3d162 100644 --- a/src/session/rx.c +++ b/src/session/rx.c @@ -20,6 +20,7 @@ #include "zenoh-pico/api/types.h" #include "zenoh-pico/collections/bytes.h" #include "zenoh-pico/protocol/core.h" +#include "zenoh-pico/protocol/definitions/declarations.h" #include "zenoh-pico/protocol/definitions/message.h" #include "zenoh-pico/protocol/definitions/network.h" #include "zenoh-pico/protocol/keyexpr.h" @@ -130,7 +131,7 @@ int8_t _z_handle_zenoh_message(_z_session_t *zn, _z_zenoh_message_t *msg, uint16 // @TODO: expose errors to the user _z_msg_err_t error = response._body._err; _z_bytes_t payload = error._ext_value.payload; - _Z_ERROR("Received Err for query %d: code=%d, message=%.*s\n", response._request_id, error.code, + _Z_ERROR("Received Err for query %d: code=%d, message=%.*s\n", response._request_id, error._code, payload.len, payload.start); } break; case _Z_RESPONSE_BODY_ACK: {