cloudant / nodejs-cloudant

Cloudant Node.js client library
Apache License 2.0
255 stars 90 forks source link

Error when user cannot be authenticated using IAM. #392

Closed smithsz closed 5 years ago

smithsz commented 5 years ago

Checklist

Description

Error when user cannot be authenticated using IAM.

Testing

Includes additional/updated unit tests.

Monitoring and Logging

No change.

ricellis commented 5 years ago

I don't think we need a config option here, at the end of the day if the auth exchange has failed and there are no retries remaining the request is going to fail anyway. Given the confusion we've seen around allowing the request to go and fail at the service it probably makes more sense to fail it early; making the cause more clear (i.e. the auth exchange failure).