Open
Description
Checkboxes for prior research
- I've gone through Developer Guide and API reference
- I've checked AWS Forums and StackOverflow.
- I've searched for previous similar issues and didn't find any solution.
Describe the bug
Cannot destructure property 'response' of '(intermediate value)' as it is undefined
is reported to Sentry pretty regularly when using @aws-sdk/client-lambda.
Regression Issue
- Select this option if this issue appears to be a regression.
SDK version number
@aws-sdk/[email protected]
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
node v22.11.0
Reproduction Steps
Cannot reproduce easily.
We're calling lambda.invoke
the following way:
import { Lambda } from '@aws-sdk/client-lambda';
import { NodeHttpHandler } from '@smithy/node-http-handler';
const lambda = new Lambda({
region: 'us-west-2',
apiVersion: '2015-03-31',
requestHandler: new NodeHttpHandler({
connectionTimeout: 1000,
socketTimeout: 1000,
}),
});
// ...
const response = await lambda.invoke({
FunctionName: longlinksStoreLambdaFunctionName,
InvocationType: 'RequestResponse',
LogType: 'None',
Payload: JSON.stringify({
body: JSON.stringify({
url,
hashLength,
}),
}),
});
I just noticed that our apiVersion
value is quite old btw.
Observed Behavior
The following error is being reported to Sentry:
Note that this doesn't happen every time, so it "feels" like a race condition.
Expected Behavior
No error
Possible Solution
No response
Additional Information/Context
See also smithy-lang/smithy-typescript#1558