Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error tracing issues #114

Open
ffxsam opened this issue Jan 5, 2022 · 2 comments
Open

Error tracing issues #114

ffxsam opened this issue Jan 5, 2022 · 2 comments

Comments

@ffxsam
Copy link
Collaborator

ffxsam commented Jan 5, 2022

Has anyone else noticed your stack traces don't seem to go back as far as they should when there's a SQL error?

    "stack": [
        "BadRequestException: Number of characters in SQLStatement is longer than 65536",
        "    at Object.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:52:27)",
        "    at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/rest_json.js:55:8)",
        "    at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20)",
        "    at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10)",
        "    at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:688:14)",
        "    at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)",
        "    at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)",
        "    at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10",
        "    at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)",
        "    at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:690:12)"
    ]

I wonder why it starts within the AWS SDK library, and not my actual code. Anyone know? It makes it incredibly difficult to debug issues.

@cnnrmtthws
Copy link

I'm not sure what the underlying reason is but it looks like a general problem with errors from the AWS JS SDK aws/aws-sdk-js#1358. A comment on that issue says that it has been fixed in the v3 SDK as it needed a major version change aws/aws-sdk-js#1358 (comment)

@ffxsam
Copy link
Collaborator Author

ffxsam commented Jan 14, 2022

I've patched my own personal version of data-api-client to use the v3 SDK. I'll have to pay attention to whether db errors trace differently now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants