@friggframework/core 2.0.0--canary.657.798cee9.0 → 2.0.0--canary.657.f16d20b.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.
@@ -31,6 +31,7 @@ class RateLimitError extends FetchError {
31
31
  super(fetchErrorArgs);
32
32
 
33
33
  const timing = resolveTiming({ hint, waitMs, now });
34
+ this.statusCode ??= fetchErrorArgs.cause?.statusCode;
34
35
  this.isRateLimited = true;
35
36
  this.waitMs = timing.waitMs;
36
37
  this.retryAt = timing.retryAt;
@@ -110,9 +110,9 @@ function computeScopeKey(policy, requester) {
110
110
  if (typeof scope === 'function') {
111
111
  try {
112
112
  const value = scope(requester);
113
- return value === undefined || value === null
114
- ? undefined
115
- : `${label}:custom:${String(value)}`;
113
+ return typeof value === 'string' || Number.isFinite(value)
114
+ ? `${label}:custom:${value}`
115
+ : undefined;
116
116
  } catch {
117
117
  return undefined;
118
118
  }
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.657.798cee9.0",
4
+ "version": "2.0.0--canary.657.f16d20b.0",
5
5
  "dependencies": {
6
6
  "@aws-sdk/client-apigatewaymanagementapi": "^3.588.0",
7
7
  "@aws-sdk/client-kms": "^3.588.0",
@@ -48,9 +48,9 @@
48
48
  }
49
49
  },
50
50
  "devDependencies": {
51
- "@friggframework/eslint-config": "2.0.0--canary.657.798cee9.0",
52
- "@friggframework/prettier-config": "2.0.0--canary.657.798cee9.0",
53
- "@friggframework/test": "2.0.0--canary.657.798cee9.0",
51
+ "@friggframework/eslint-config": "2.0.0--canary.657.f16d20b.0",
52
+ "@friggframework/prettier-config": "2.0.0--canary.657.f16d20b.0",
53
+ "@friggframework/test": "2.0.0--canary.657.f16d20b.0",
54
54
  "@prisma/client": "^6.19.3",
55
55
  "@types/lodash": "4.17.15",
56
56
  "@typescript-eslint/eslint-plugin": "^8.0.0",
@@ -91,5 +91,5 @@
91
91
  "publishConfig": {
92
92
  "access": "public"
93
93
  },
94
- "gitHead": "798cee9c975be131b5446e7d35fbfcceb5329a04"
94
+ "gitHead": "f16d20b91d76dd1c98f7e0dc91eb4026bafba2a3"
95
95
  }