Browse Source
Merge pull request #465 from Empact/fix/api-error-throw
fix: Don't catch api/index errors
renovate/lint-staged-8.x
Ben Woosley
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
9 deletions
-
app/api/index.js
|
@ -5,9 +5,7 @@ export function requestTicker(id) { |
|
|
return axios({ |
|
|
return axios({ |
|
|
method: 'get', |
|
|
method: 'get', |
|
|
url: BASE_URL |
|
|
url: BASE_URL |
|
|
}) |
|
|
}).then(response => response.data) |
|
|
.then(response => response.data) |
|
|
|
|
|
.catch(error => error) |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export function requestTickers(ids) { |
|
|
export function requestTickers(ids) { |
|
@ -23,9 +21,7 @@ export function requestBlockHeight() { |
|
|
return axios({ |
|
|
return axios({ |
|
|
method: 'get', |
|
|
method: 'get', |
|
|
url: BASE_URL |
|
|
url: BASE_URL |
|
|
}) |
|
|
}).then(response => response.data) |
|
|
.then(response => response.data) |
|
|
|
|
|
.catch(error => error) |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export function requestSuggestedNodes() { |
|
|
export function requestSuggestedNodes() { |
|
@ -33,7 +29,5 @@ export function requestSuggestedNodes() { |
|
|
return axios({ |
|
|
return axios({ |
|
|
method: 'get', |
|
|
method: 'get', |
|
|
url: BASE_URL |
|
|
url: BASE_URL |
|
|
}) |
|
|
}).then(response => response.data) |
|
|
.then(response => response.data) |
|
|
|
|
|
.catch(error => error) |
|
|
|
|
|
} |
|
|
} |
|
|