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

Error not serializable due to circular references

Open stefee opened this issue 3 years ago • 2 comments

Describe the bug

Error thrown by calling new SSMClient({}).send(new GetParameterCommand({Name: name})) cannot be serialized by the pino logger due to circular reference.

"err":"[unable to serialize, circular reference is too complex to analyze]"

Your environment

SDK version number

@aws-sdk/[email protected]

Is the issue in the browser/Node.js/ReactNative?

Node.js

Details of the browser/Node.js/ReactNative version

v16.14.0

Steps to reproduce

Do a GetParameterCommand for a parameter name that does not exist:

new SSMClient({}).send(new GetParameterCommand({Name: name}))

Observed behavior

Pino log:

"err":"[unable to serialize, circular reference is too complex to analyze]"

Expected behavior

Pino log:

"err":{"name":"...","message":"...",...}

Screenshots

Additional context

stefee avatar Mar 25 '22 18:03 stefee

Hey @stefee thanks for opening this issue, from the SDK I do get ParameterNotFound error. https://github.com/pinojs/pino maybe be the right place for this issue.

ajredniwja avatar Jun 24 '22 18:06 ajredniwja

This could be fixed by removing circular references.

stefee avatar Jun 24 '22 19:06 stefee