Uncaught TypeError TypeError: Converting circular structure to JSON
Checkboxes for prior research
- [x] I've gone through Developer Guide and API reference
- [x] I've checked AWS Forums and StackOverflow.
- [x] I've searched for previous similar issues and didn't find any solution.
Describe the bug
When trying to connect to a AWS PCA, if there is missing authorization, the result appears like the following:
Uncaught TypeError TypeError: Converting circular structure to JSON
--> starting at object with constructor 'IncomingMessage'
| property 'req' -> object with constructor 'ClientRequest'
--- property 'res' closes the circle
at eval (repl:1:6)
With the version 3.721.0 it worked but with the following ones it started to bug.
Regression Issue
- [ ] Select this option if this issue appears to be a regression.
SDK version number
@aws-sdk/package-name@version, ...
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
"@aws-sdk/client-acm-pca": "3.901.0"
Reproduction Steps
- Create an User with missing authorizations;
- Try to issue an AWS certificate;
- While debugging, get an error like the following:
Uncaught TypeError TypeError: Converting circular structure to JSON
--> starting at object with constructor 'IncomingMessage'
| property 'req' -> object with constructor 'ClientRequest'
--- property 'res' closes the circle
at eval (repl:1:6)
- Notice that it comes from JSON.stringify(result), line 37 from "node_modules/@smithy/util-waiter/dist-cjs/index.js".
Observed Behavior
It appears an error like the following:
Uncaught TypeError TypeError: Converting circular structure to JSON
--> starting at object with constructor 'IncomingMessage'
| property 'req' -> object with constructor 'ClientRequest'
--- property 'res' closes the circle
at eval (repl:1:6)
Expected Behavior
It should appear a normal String error message.
Possible Solution
No response
Additional Information/Context
No response
The fix is published to https://www.npmjs.com/package/@smithy/util-waiter/v/4.2.4
you can bring in this version by running npm up @smithy/util-waiter or otherwise updating your lockfile.
We are having the same issue with "@aws-sdk/client-s3" and updating to 4.2.4 did not fix the issue.