@middy/util 5.2.0 → 5.2.2

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.
Files changed (2) hide show
  1. package/index.js +7 -0
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -134,6 +134,13 @@ export const processCache = (options, fetch = () => undefined, request) => {
134
134
  return { value, expiry }
135
135
  }
136
136
 
137
+ export const catchInvalidSignatureException = (e, client, command) => {
138
+ if (e.__type === 'InvalidSignatureException') {
139
+ return client.send(command)
140
+ }
141
+ throw e
142
+ }
143
+
137
144
  export const getCache = (key) => {
138
145
  if (!cache[key]) return {}
139
146
  return cache[key]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middy/util",
3
- "version": "5.2.0",
3
+ "version": "5.2.2",
4
4
  "description": "🛵 The stylish Node.js middleware engine for AWS Lambda (util package)",
5
5
  "type": "module",
6
6
  "engines": {
@@ -55,7 +55,7 @@
55
55
  },
56
56
  "devDependencies": {
57
57
  "@aws-sdk/client-ssm": "^3.0.0",
58
- "@middy/core": "5.2.0",
58
+ "@middy/core": "5.2.2",
59
59
  "@types/aws-lambda": "^8.10.76",
60
60
  "@types/node": "^20.0.0",
61
61
  "aws-xray-sdk": "^3.3.3"
@@ -65,5 +65,5 @@
65
65
  "type": "github",
66
66
  "url": "https://github.com/sponsors/willfarrell"
67
67
  },
68
- "gitHead": "2d9096a49cd8fb62359517be96d6c93609df41f0"
68
+ "gitHead": "dbfe56d5dfc783fae1e19c7dddd074c0d18d5073"
69
69
  }