Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async blacklist() {
l.info('BlacklistService - blacklist() / Performing request to fetch blacklists!')
try {
const res = await axios(BLACKLIST_RESOURCE_URL)
return { blacklist: res.data }
} catch (err) {
l.error(`BlacklistService - blacklist() / ${err}`)
throw new errors.HttpStatusError(502, "Can't retrieve blacklist resource from Github. Please, try again later.")
}
}
}