さすがにServiceからHttpExceptionは雑すぎたか

This commit is contained in:
shibafu
2020-07-23 13:08:20 +09:00
parent 16b5fb3533
commit 0a9920b11c
4 changed files with 41 additions and 2 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Listeners;
use App\Events\LinkDiscovered;
use App\MetadataResolver\DeniedHostException;
use App\Services\MetadataResolveService;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
@@ -32,6 +33,8 @@ class LinkCollector
{
try {
$this->metadataResolveService->execute($event->url);
} catch (DeniedHostException $e) {
// ignored
} catch (\Exception $e) {
// 今のところこのイベントは同期実行されるので、上流をクラッシュさせないために雑catchする
report($e);