Return empty orders on error
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-07-02 18:58:00 +03:00
parent 04a3ea5a23
commit f7b78f6d0f

View File

@@ -10,7 +10,16 @@ class Api {
async _get (url) { async _get (url) {
await this.limiter.removeTokens(1) await this.limiter.removeTokens(1)
return axios.get(url).catch(console.error) return axios.get(url).catch((error) => {
console.error(error)
return {
data: {
payload: {
orders: []
}
}
}
})
} }
async getOrders (url) { async getOrders (url) {