Merge pull request #995 from MrPetovan/bug/fatal-errors

[twitter] Fix media upload failure logging
pull/997/head
Tobias Diekershoff 2020-07-03 17:57:20 +02:00 committed by GitHub
commit 25e1e98a34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -693,7 +693,8 @@ function twitter_post_hook(App $a, array &$b)
Logger::info('Metadata create', ['id' => $b['id'], 'data' => $data, 'return' => json_encode($ret)]);
}
} else {
throw new Exception('Failed upload', ['id' => $b['id'], 'image' => $image['url']]);
Logger::error('Failed upload', ['id' => $b['id'], 'image' => $image['url']]);
throw new Exception('Failed upload of ' . $image['url']);
}
}
$post['media_ids'] = implode(',', $media_ids);