Avoid losing entry when fetching fail

Instead of just say “Failed to save entry” we’ll save the entry at all cost and try to fetch content. If fetching content failed, the entry will still be saved at least, but without content.
This commit is contained in:
Jeremy Benoist
2016-09-17 07:40:56 +02:00
parent fbb319f064
commit 59b97fae99
18 changed files with 73 additions and 84 deletions

View File

@ -566,6 +566,8 @@ JSON;
"status": 1,
"list": {
"229279689": {
"status": "1",
"favorite": "1",
"resolved_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview"
}
}
@ -603,6 +605,6 @@ JSON;
$res = $pocketImport->import();
$this->assertTrue($res);
$this->assertEquals(['skipped' => 1, 'imported' => 0, 'queued' => 0], $pocketImport->getSummary());
$this->assertEquals(['skipped' => 0, 'imported' => 1, 'queued' => 0], $pocketImport->getSummary());
}
}