diff --git a/README.md b/README.md index c34e8d2479..a118d9866d 100644 --- a/README.md +++ b/README.md @@ -66,14 +66,10 @@ client timeout: 1000, // milliseconds }) .then((r) => { - if (r.data.status === Status.OK) { - console.log(r.data.results[0].elevation); - } else { - console.log(r.data.error_message); - } + console.log(r.data.results[0].elevation); }) .catch((e) => { - console.log(e); + console.log(e.response.data.error_message); }); ```