diff --git a/utils/screenShot.go b/utils/screenShot.go index 1793c08a03c18c9519989fdb70f0359965eed12d..3c54bc93a55c10a74fc593ae0bea850bb6e0625a 100644 --- a/utils/screenShot.go +++ b/utils/screenShot.go @@ -2,9 +2,10 @@ package utils import ( "context" + "fmt" "log" "strings" - + logging "dcsg2900-threattotal/logs" "github.com/chromedp/chromedp" ) @@ -35,7 +36,8 @@ func ScreenshotURL(url string, Response *ResultFrontendResponse) { // Take the screenshot using the screenScreenshot function if err := chromedp.Run(ctx, screenScreenshot(SearchURL, &screenshotbuf)); err != nil { - log.Fatal(err) + fmt.Println("This URL or Domain can not be accessed.") + logging.Logerror(err, "Page could not be loaded, URL or domain does not exist.") } log.Printf("Took a screenshot of a request url")