Skip to content

Commit

Permalink
throw new Error
Browse files Browse the repository at this point in the history
  • Loading branch information
sefinek committed Dec 16, 2024
1 parent 23e9da2 commit 79d880e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/https.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const headers = {
const timeout = 25000;

const get = async url => {
if (!url || typeof url !== 'string') throw new Error('Missing URL, expected a string');
if (!url || typeof url !== 'string') throw new Error('Missing URL, expected a string.');

return new Promise((resolve, reject) => {
const req = https.get(url, { headers, timeout }, res => {
Expand Down

0 comments on commit 79d880e

Please sign in to comment.