server messages NEW function to get last error from an error reply
diff --git a/src/messages_server.h b/src/messages_server.h
index c615786..28de65a 100644
--- a/src/messages_server.h
+++ b/src/messages_server.h
@@ -108,6 +108,14 @@
 int nc_server_reply_add_err(struct nc_server_reply *reply, struct nc_server_error *err);
 
 /**
+ * @brief Get last error from an ERROR rpy-reply object.
+ *
+ * @param[in] reply ERROR reply to read from.
+ * @return Last error, NULL on failure.
+ */
+const struct nc_server_error *nc_server_reply_get_last_err(const struct nc_server_reply *reply);
+
+/**
  * @brief Create a server error structure. Its \<error-message\> is filled with
  * a general description of the specific error.
  *