aws-sdk-js-v3 icon indicating copy to clipboard operation
aws-sdk-js-v3 copied to clipboard

Cannot read property 'Error' of undefined" exception at loadEc2ErrorCode

Open orly-schwartz opened this issue 3 years ago • 2 comments

Describe the bug

EC2 api calls causes “Cannot read property 'Error' of undefined" exception at loadEc2ErrorCode”

Expected Behavior

error handler function should not throw exception

Current Behavior

Upon initiation of the “describe instances” api call, sporadically, for some of the calls, the “Cannot read property 'Error' of undefined\n at loadEc2ErrorCode” exception was thrown. For example 5 out of the 6000 api calls ailed (rate 20 rps) The issue happened also when running the “create tag” command.

Stack:

:{\"message\":\"Cannot read property 'Error' of undefined\",\"stack\":\"TypeError: Cannot read property 'Error' of undefined\\n	at loadEc2ErrorCode (/opt/app/node_modules/@aws-sdk/client-ec2/dist-cjs/protocols/Aws_ec2.js:65707:21)\\n	at deserializeAws_ec2DescribeInstancesCommandError (/opt/app/node_modules/@aws-sdk/client-ec2/dist-cjs/protocols/Aws_ec2.js:14422:17)\\n	at runMicrotasks (<anonymous>)\\n	at processTicksAndRejections (node:internal/process/task_queues:96:5)\\n	at async /opt/app/node_modules/@aws-sdk/middleware-serde/dist-cjs/deserializerMiddleware.js:7:24\\n	at async /opt/app/node_modules/@aws-sdk/middleware-signing/dist-cjs/middleware.js:11:20\\n	at async StandardRetryStrategy.retry (/opt/app/node_modules/@aws-sdk/middleware-retry/dist-cjs/StandardRetryStrategy.js:51:46)\\n	at async /opt/app/node_modules/@aws-sdk/middleware-logger/dist-cjs/loggerMiddleware.js:6:22\\n	at async execute (/opt/app/src/services/executer/Executer.ts:99:16)\\n	at async ConsumerService.invoke (/opt/app/src/services/consumer/ConsumerService.ts:122:34)\"}}"

Reproduction Steps

run the DescribeInstancesCommand repeatedly a large number of time at a rate of 20 rps

await this.ec2Client.send(
      new DescribeInstancesCommand({
        MaxResults: 20
      }),
    );

Possible Solution

No response

Additional Information/Context

No response

SDK version used

@aws-sdk/[email protected]

Environment details (OS name and version, etc.)

Linux 5.10.76-linuxkit x86_64

orly-schwartz avatar Jul 06 '22 11:07 orly-schwartz

Hi @orly-schwartz ,

I'm not able to reproduce the error. Can you tell me how you set up your resources to get 20 reads per second?

Thanks. ~Ran

RanVaknin avatar Aug 18 '22 18:08 RanVaknin

Hi @RanVaknin ,

Im not setting up anything , the Request token bucket refill rate for non-mutating actions (filtered/paginated) is 20 rps

Thanks, Orly

orly-schwartz avatar Aug 22 '22 08:08 orly-schwartz

Greetings! We’re closing this issue because it has been open a long time and hasn’t been updated in a while and may not be getting the attention it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to comment or open a new issue.

github-actions[bot] avatar Feb 08 '24 00:02 github-actions[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

github-actions[bot] avatar Feb 26 '24 00:02 github-actions[bot]