Skip to content

Commit

Permalink
Catch exception when saving content
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartcusackie authored Aug 31, 2022
1 parent 9e3bb42 commit eb7c300
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@ protected function listen() {
Event::listen(function (EntrySaved $event) {

if($event->entry->url) {
StatamicGlideRequester::queueUrl(url($event->entry->url));

try{
StatamicGlideRequester::queueUrl(url($event->entry->url));
}
catch(\RedisException $e){
Log::warning('Redis Error: Could not queue saved entry for glide requesting.');
}

}

});
Expand Down

0 comments on commit eb7c300

Please sign in to comment.