From c215c076e41c626b24beda668ad4c3064c493eee Mon Sep 17 00:00:00 2001 From: tastytea Date: Tue, 22 May 2018 12:43:51 +0200 Subject: [PATCH] improved error checking --- CMakeLists.txt | 2 +- src/masto.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f8c295..0bcaf8c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.7) project (expandurl-mastodon - VERSION 0.5.5 + VERSION 0.5.6 LANGUAGES CXX ) diff --git a/src/masto.cpp b/src/masto.cpp index f3e95f0..94826ed 100644 --- a/src/masto.cpp +++ b/src/masto.cpp @@ -285,7 +285,7 @@ const std::uint_fast64_t Listener::get_parent_id(const Easy::Notification ¬if // Fetch full status ret = _masto->get(API::v1::search, {{ "q", { notif.status().url() }}}, answer); - if (ret > 0) + if (ret > 0 || !Easy::Status(answer).valid()) { cerr << "ERROR: " << ret << "Could not fetch status (in " << __FUNCTION__ << ")\n";