Skip to content

Commit

Permalink
Update the final example
Browse files Browse the repository at this point in the history
  • Loading branch information
slashequip committed Jan 16, 2022
1 parent c9395c1 commit cbc7358
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ $blogPost = Attempt::make()
})
->times(3)
->waitBetween(250)
->catch(ClientException::class)
->catch(ClientException::class, function (ClientException $e) {
error_log("Unstable blog api service is causing issues again.")
return new BlogPost::nullableObject();
})
->then(function ($apiResponse) {
return BlogPost::fromApiResponse($apiResponse);
});
Expand Down

0 comments on commit cbc7358

Please sign in to comment.