node-asana icon indicating copy to clipboard operation
node-asana copied to clipboard

Allow for root configurations

Open nairihar opened this issue 5 years ago • 2 comments

For example we may do this:

const asana = require('node-asana');
asana.config.setConfig('RateLimitEnforced', {
    retry_after: 5000,
});

nairihar avatar Jan 14 '21 07:01 nairihar

I'm not so sure why we have this kind of error in Travis, but it may be good to have this kind of root configuration. Maybe you can add some comments about how we should fix the tests or how we can implement the same thing another way.

nairihar avatar Jan 14 '21 07:01 nairihar

Hmm, I'm not sure what the use case for this change is. For rate_limit_enforced errors, the API sends back a retry-after (which is exactly how long you should wait before your request will succeed) and the client library already parses that for retries.

Is there another error you want config for?

rossgrambo-zz avatar Feb 26 '21 18:02 rossgrambo-zz