a little error handling

This commit is contained in:
Martin Donnelly 2018-06-13 23:54:49 +01:00
parent 77e19f3e06
commit 0423d33aa8

View File

@ -145,7 +145,9 @@ function getUrl (req, res) {
logger.debug(response.headers);
const tempUrl = new URL(theUrl);
rUrl = URL.parse(`${tempUrl.origin}${response.headers.location}`);
const newURL = `${tempUrl.origin}${response.headers.location}`;
logger.debug('newURL', newURL);
rUrl = URL.parse(newURL);
}
else
rUrl = URL.parse(response.headers.location);