diff --git a/index.js b/index.js index 0257eec..79821ce 100644 --- a/index.js +++ b/index.js @@ -31,7 +31,7 @@ class Crypto { 'Accept': 'application/json, text/plain, */*', 'Content-Type': 'application/json' } - }).then(res => res.json()) + }).then(res => res.status === 200 ? res.json() : res.text()) } async stats() { return await this.call()