node-red-nodes/social
Matt Borja 640a6d0cb2
Improve error handling for read-only applications (#709)
Applications pending approval will return a different response body than what is presently supported.

Below is a copy of the actual response that comes back in this scenario:
```
{"status":401,"rateLimitTimeout":null,"body":{"request":"/1.1/statuses/update.json","error":"Read-only application cannot POST."}}
```

Whereas the current implementation assumes the presence of an `errors` array, reading off the first element (i.e. `result.body.errors[0]`), the above scenario throws an exception as `result.body.errors` is now `undefined` and cannot be indexed).

The proposed update seeks to account for this while retaining existing functionality and has been tested (error message in debug now properly says "Read-only application cannot POST."
2020-11-11 11:26:56 +00:00
..
dweetio fix tweet.io links 2017-06-13 00:11:30 +01:00
email email node - add msg.priority and msg.headers options 2020-10-26 09:08:10 +00:00
feedparser bump lib 2020-05-05 19:36:48 +01:00
irc Re-lint a load of nodes 2017-01-29 17:45:44 +00:00
nma Deprecate NMA node prior to deletion 2018-06-02 13:41:22 +01:00
notify A whole bunch of whitespace linting - no functional changes 2019-08-11 13:37:15 +01:00
prowl Use latest release of node-prowl (#624) 2020-02-17 22:12:23 +00:00
pushbullet Bump pushbullet node version 2020-10-13 22:38:18 +01:00
pusher update pusher nodes to later api 2017-08-27 14:00:20 +01:00
pushover Fix not shown error (#692) 2020-09-27 12:57:09 +01:00
twilio bump email, feed parser, twilio, sqlite, rbe packages 2018-03-29 09:34:31 +01:00
twitter Improve error handling for read-only applications (#709) 2020-11-11 11:26:56 +00:00
xmpp tidy up xmpp node 2020-10-24 15:02:45 +01:00