diff --git a/CHANGELOG.md b/CHANGELOG.md index 226aec6d..8aeb698d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Unreleased * Improved message sending and draft create/update performance +* Change default timeout to match API (90 seconds) ### 7.2.0 / 2024-02-27 * Added support for `roundTo` field in availability response model diff --git a/src/nylas.ts b/src/nylas.ts index f786c1f0..c8bf0e0c 100644 --- a/src/nylas.ts +++ b/src/nylas.ts @@ -89,7 +89,7 @@ export default class Nylas { this.apiClient = new APIClient({ apiKey: config.apiKey, apiUri: config.apiUri || DEFAULT_SERVER_URL, - timeout: config.timeout || 30, + timeout: config.timeout || 90, }); this.applications = new Applications(this.apiClient); diff --git a/tests/nylas.spec.ts b/tests/nylas.spec.ts index b78e1642..67040485 100644 --- a/tests/nylas.spec.ts +++ b/tests/nylas.spec.ts @@ -42,7 +42,7 @@ describe('Nylas', () => { }); expect(nylas.apiClient.serverUrl).toBe('https://api.us.nylas.com'); - expect(nylas.apiClient.timeout).toBe(30000); + expect(nylas.apiClient.timeout).toBe(90000); }); }); });