@wildix/xbees-conversations-utils 1.1.59 → 1.1.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,6 @@ const createRateLimitExceededException_1 = require("./createRateLimitExceededExc
7
7
  const processStreamRateLimitException_1 = require("./processStreamRateLimitException");
8
8
  const RedisCooldown_1 = require("./RedisCooldown");
9
9
  function calculateRateLimitDelayMs(error, maxDelayMs) {
10
- console.log('calculateRateLimitDelayMs', error.retryAfter);
11
10
  const retryAfterMs = typeof error.retryAfter === 'number' ? error.retryAfter + constants_1.RETRY_AFTER_BUFFER_MS : constants_1.DEFAULT_RETRY_AFTER_MS;
12
11
  if (retryAfterMs > 0) {
13
12
  const jitterMs = Math.floor(Math.random() * constants_1.DEFAULT_JITTER_MS);
@@ -24,7 +24,7 @@ function processStreamRateLimitException(error) {
24
24
  return (0, createRateLimitExceededException_1.createRateLimitExceededException)({ message: error.message || 'Rate limit exceeded' });
25
25
  }
26
26
  if (typeof error === 'object' && error !== null && 'status' in error && error.status === 429) {
27
- console.warn('Stream rate limit exceeded [error.status === 429]');
27
+ console.warn('Stream rate limit exceeded [error.status === 429]', error, error.metadata);
28
28
  return (0, createRateLimitExceededException_1.createRateLimitExceededException)({ message: 'Rate limit exceeded' });
29
29
  }
30
30
  }
@@ -4,7 +4,6 @@ import { createRateLimitExceededException } from './createRateLimitExceededExcep
4
4
  import { processStreamRateLimitException } from './processStreamRateLimitException';
5
5
  import { RedisCooldown } from './RedisCooldown';
6
6
  function calculateRateLimitDelayMs(error, maxDelayMs) {
7
- console.log('calculateRateLimitDelayMs', error.retryAfter);
8
7
  const retryAfterMs = typeof error.retryAfter === 'number' ? error.retryAfter + RETRY_AFTER_BUFFER_MS : DEFAULT_RETRY_AFTER_MS;
9
8
  if (retryAfterMs > 0) {
10
9
  const jitterMs = Math.floor(Math.random() * DEFAULT_JITTER_MS);
@@ -21,7 +21,7 @@ export function processStreamRateLimitException(error) {
21
21
  return createRateLimitExceededException({ message: error.message || 'Rate limit exceeded' });
22
22
  }
23
23
  if (typeof error === 'object' && error !== null && 'status' in error && error.status === 429) {
24
- console.warn('Stream rate limit exceeded [error.status === 429]');
24
+ console.warn('Stream rate limit exceeded [error.status === 429]', error, error.metadata);
25
25
  return createRateLimitExceededException({ message: 'Rate limit exceeded' });
26
26
  }
27
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildix/xbees-conversations-utils",
3
- "version": "1.1.59",
3
+ "version": "1.1.60",
4
4
  "description": "",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",