Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async symbol(symbol) {
l.info(`TickerService - symbols() / Fetching request for current symbol: ${symbol}`)
try {
const res = await axios(CRYPTOCOMPARE_API)
return this.toTickerJson(symbol, res.data)
} catch (err) {
l.error(`TickerService - symbols() / Error fetching request for current symbol: ${symbol} | ${err}`)
throw errors.Http502Error({
message: "Can't retrieve ticker list from original server. Please, try again later."
})
}
}