From cea62460cd84ab111fa5dd1dbca4d18e26a45162 Mon Sep 17 00:00:00 2001 From: Alonisser Date: Fri, 22 Dec 2017 16:53:26 +0200 Subject: [PATCH] Adding description of errors to README.md --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 30b354a9..02f3767f 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,21 @@ const isTweet = _.conforms({ }) ``` +## API errors + +Api errors are returned (with "catch" in the Promise api or with "err" param in the callback api) as an array of errors. +Thus errors described in twitter docs for example as: +```JSON + { "errors": [ { "code": 88, "message": "Rate limit exceeded" } ] } + +``` +Would return as : + +``` + [ { "code": 88, "message": "Rate limit exceeded" } ] + +``` + ## Examples * [Tweet](https://github.com/desmondmorris/node-twitter/tree/master/examples#tweet)