diff --git a/lib/phantomBase.js b/lib/phantomBase.js
index <HASH>..<HASH> 100644
--- a/lib/phantomBase.js
+++ b/lib/phantomBase.js
@@ -47,8 +47,7 @@ function openPage(url, callback, retries) {
     const maxAttempts = retries || MAX_RETRIES;
 
     if (!url) {
-        console.error("Enter a valid url!");
-        return;
+        throw 'ERROR: No url is defined';
     }
Throw error to if the url is not defined for openPage()