@friggframework/core 2.0.0--canary.623.9b7cdf7.0 → 2.0.0--canary.623.b39b42d.0

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.
@@ -12,8 +12,6 @@ class Requester extends Delegate {
12
12
  this.backOff = get(params, 'backOff', [1, 3, 10, 30, 60, 180]);
13
13
  this.isRefreshable = false;
14
14
  this.refreshCount = 0;
15
- // Deliberately separate from `i` — a 429/5xx retry must not consume
16
- // the 401 grace retry budget below.
17
15
  this.authGraceRetryCount = 0;
18
16
  this.DLGT_INVALID_AUTH = 'INVALID_AUTH';
19
17
  this.delegateTypes.push(this.DLGT_INVALID_AUTH);
@@ -63,6 +61,10 @@ class Requester extends Delegate {
63
61
  };
64
62
 
65
63
  /**
64
+ * @param {string} url - The request URL, relative or absolute.
65
+ * @param {Object} options - Fetch options (method, headers, body, query,
66
+ * returnFullRes, etc.) built by the `_get`/`_post`/`_patch`/`_put`/
67
+ * `_delete` wrappers.
66
68
  * @param {number} attempt - 0-based count of retries already made for
67
69
  * this call. Indexes `this.backOff` for the next delay and is passed
68
70
  * back in on each recursive retry.
@@ -166,7 +168,10 @@ class Requester extends Delegate {
166
168
  if (!this.isRefreshable) {
167
169
  // Up to MAX_AUTH_RETRIES grace retries before invalidating
168
170
  // — a 401 alone isn't proof the credential is bad.
169
- if (this.authGraceRetryCount < MAX_AUTH_RETRIES) {
171
+ if (
172
+ this.authGraceRetryCount < MAX_AUTH_RETRIES &&
173
+ this.authGraceRetryCount < this.backOff.length
174
+ ) {
170
175
  const delay =
171
176
  this.backOff[this.authGraceRetryCount] * 1000;
172
177
  this.authGraceRetryCount++;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@friggframework/core",
3
3
  "prettier": "@friggframework/prettier-config",
4
- "version": "2.0.0--canary.623.9b7cdf7.0",
4
+ "version": "2.0.0--canary.623.b39b42d.0",
5
5
  "dependencies": {
6
6
  "@aws-sdk/client-apigatewaymanagementapi": "^3.588.0",
7
7
  "@aws-sdk/client-kms": "^3.588.0",
@@ -38,9 +38,9 @@
38
38
  }
39
39
  },
40
40
  "devDependencies": {
41
- "@friggframework/eslint-config": "2.0.0--canary.623.9b7cdf7.0",
42
- "@friggframework/prettier-config": "2.0.0--canary.623.9b7cdf7.0",
43
- "@friggframework/test": "2.0.0--canary.623.9b7cdf7.0",
41
+ "@friggframework/eslint-config": "2.0.0--canary.623.b39b42d.0",
42
+ "@friggframework/prettier-config": "2.0.0--canary.623.b39b42d.0",
43
+ "@friggframework/test": "2.0.0--canary.623.b39b42d.0",
44
44
  "@prisma/client": "^6.19.3",
45
45
  "@types/lodash": "4.17.15",
46
46
  "@typescript-eslint/eslint-plugin": "^8.0.0",
@@ -80,5 +80,5 @@
80
80
  "publishConfig": {
81
81
  "access": "public"
82
82
  },
83
- "gitHead": "9b7cdf7b3bcdcd7746a50c30519d2eebe16db23d"
83
+ "gitHead": "b39b42dc96ec3dfe4963a63b27468cd1b9c107c6"
84
84
  }