Skip to content

Commit

Permalink
pkp#10036 Improve error handling with network outages
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Jul 19, 2024
1 parent 10423e0 commit d806c08
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions controllers/grid/plugins/PluginGalleryGridHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,16 @@ protected function loadData($request, $filter)
{
// Get all plugins.
$pluginGalleryDao = DAORegistry::getDAO('PluginGalleryDAO'); /** @var PluginGalleryDAO $pluginGalleryDao */
return $pluginGalleryDao->getNewestCompatible(
Application::get(),
$request->getUserVar('category'),
$request->getUserVar('pluginText')
);
try {
return $pluginGalleryDao->getNewestCompatible(
Application::get(),
$request->getUserVar('category'),
$request->getUserVar('pluginText')
);
} catch (\GuzzleHttp\Exception\TransferException $e) {
error_log($e);
return [];
}
}

/**
Expand Down

0 comments on commit d806c08

Please sign in to comment.