Skip to content

Commit

Permalink
πŸ•΅οΈβ€β™‚οΈ Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen Melbourne committed Feb 9, 2021
1 parent 4c9d97d commit 5327c4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
7 changes: 2 additions & 5 deletions app/Crawler/CrawlObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Psr\Http\Message\UriInterface;
use Psr\Http\Message\ResponseInterface;
use GuzzleHttp\Exception\RequestException;
use App\Notifications\BrowserMessageDetected;
use Spatie\Crawler\CrawlObserver as SpatieCrawlObserver;

class CrawlObserver extends SpatieCrawlObserver
Expand Down Expand Up @@ -92,15 +91,13 @@ public function crawlFailed(UriInterface $url, RequestException $requestExceptio
$page->response = null;
$page->exception = $requestException->getCode() . ' - ' . $requestException->getMessage();

$this->notify($page);
BrowserConsoleCheck::dispatch($this->website, $page);

return $page->save();
}

private function notify(CrawledPage $page)
{
$page->website->user->notify(
new BrowserMessageDetected($page->website, $page)
);
// dump($page->exception);
}
}
1 change: 0 additions & 1 deletion config/odin.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
return [
'ignore_console_errors' => [
'app/Crawler/browser.js',
'ssl.responsetap.com',
],
];

0 comments on commit 5327c4f

Please sign in to comment.