improved error checking

This commit is contained in:
tastytea 2018-05-22 12:43:51 +02:00
parent 138a335047
commit c215c076e4
Signed by: tastytea
GPG Key ID: 59346E0EA35C67E5
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.7)
project (expandurl-mastodon
VERSION 0.5.5
VERSION 0.5.6
LANGUAGES CXX
)

View File

@ -285,7 +285,7 @@ const std::uint_fast64_t Listener::get_parent_id(const Easy::Notification &notif
// 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";