nylas / nylas-nodejs

A NodeJS wrapper for the Nylas REST API for email, contacts, and calendar.
MIT License
169 stars 121 forks source link

Add Rate Limit error support #405

Closed mrashed-dev closed 1 year ago

mrashed-dev commented 1 year ago

Description

This PR adds support for rate limit 429 headers from the API.

License

I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

codecov[bot] commented 1 year ago

Codecov Report

Merging #405 (1bf2d60) into main (79fcc94) will increase coverage by 0.06%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #405      +/-   ##
==========================================
+ Coverage   91.52%   91.58%   +0.06%     
==========================================
  Files          61       62       +1     
  Lines        2571     2590      +19     
  Branches      462      466       +4     
==========================================
+ Hits         2353     2372      +19     
  Misses        217      217              
  Partials        1        1              
Impacted Files Coverage Δ
src/models/rate-limit-error.ts 100.00% <100.00%> (ø)
src/nylas-connection.ts 92.45% <100.00%> (+0.19%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.