From f0fa91e2dba157a12ec565dfa0096b437210924a Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Tue, 29 Sep 2020 15:20:40 +0000 Subject: [PATCH] fix(core): update --- ts/smartrequest.request.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ts/smartrequest.request.ts b/ts/smartrequest.request.ts index 9678fb1..a775ed6 100644 --- a/ts/smartrequest.request.ts +++ b/ts/smartrequest.request.ts @@ -137,6 +137,11 @@ export let request = async ( } })() as typeof plugins.https; + if (!requestModule) { + console.error(`The request to ${domainArg} is missing a viable protocol. Must be http or https`); + return; + } + // lets perform the actual request const requestToFire = requestModule.request(optionsArg, async (response) => { if (responseStreamArg) {