LivePersonInc / node-agent-sdk

LivePerson Agent Messaging SDK for NodeJS
MIT License
49 stars 79 forks source link

Conflicting documentation #142

Open frank-fajardo-a142179 opened 3 years ago

frank-fajardo-a142179 commented 3 years ago

The README document says this when handling the error event:

If you receive a 401 error you should reconnect() according to the retry policy guidelines mentioned above, in the closed section.

However, this appear to conflict with the linked API Retry Policy Recommendations which says:

ERROR CODE MEANING RECOMMENDATION
4xx Client side error Do not retry, need to fix the problem in the code
429 Too many requests Retry after at least 1 second; avoid bursts of requests
5xx Error on server side Retry 3 times with 5, 10, 15 second pause between retries

So it implies we should NOT reconnect on 4xx, except for 429. So do NOT reconnect on HTTP 401.

Which one is correct?