You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When performing email account authorization with Nylas, if the request fails due to hitting the rate limit (status code 429), Nylas suggests implementing an exponential backoff strategy. However, the RequestFailedException thrown by Nylas does not provide access to the response headers, which contain valuable information such as the rate limit and reset time.
Describe the solution you'd like
Modify the executeRequest method in the NylasClient class to capture and return the response headers along with the response body.
Enhance the RequestFailedException class to include a field for storing the response headers.
Pass the response headers to the RequestFailedException.parseErrorResponse method when creating a new instance of RequestFailedException.
Provide getter methods in the RequestFailedException class to retrieve the response headers.
Then we can utilize the response headers in the application code to implement the exponential backoff strategy based on the rate limit and reset time provided by Nylas.
The text was updated successfully, but these errors were encountered:
Thanks for opening this issue @rknikode, we will look into this and see if we can put these improvements on a roadmap. We will reply here when we have an update.
# Changelog
### Added
* Added new error class `NylasSdkRemoteClosedError` for when the remote
connection is closed (#244)
* Added support for new filter fields for listing events (#245)
* Added response headers to Nylas API error objects (#246, #221)
# License
<!-- Your PR comment must contain the following line for us to merge the
PR. -->
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.
Is your feature request related to a problem? Please describe.
When performing email account authorization with Nylas, if the request fails due to hitting the rate limit (status code 429), Nylas suggests implementing an exponential backoff strategy. However, the RequestFailedException thrown by Nylas does not provide access to the response headers, which contain valuable information such as the rate limit and reset time.
Describe the solution you'd like
The text was updated successfully, but these errors were encountered: