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

Issue while handling GraphQL errors #5

Open
tritao opened this issue Jun 9, 2022 · 2 comments
Open

Issue while handling GraphQL errors #5

tritao opened this issue Jun 9, 2022 · 2 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@tritao
Copy link

tritao commented Jun 9, 2022

While trying the storefront and adding Mollie payments, I hit this issue:

[1] TypeError: Cannot read properties of undefined (reading 'exception')
[1]     at /home/joao/dev/storefront-remix-starter/app/graphqlWrapper.ts:92:47
[1]     at processTicksAndRejections (node:internal/process/task_queues:95:5)
[1]     at action3 (/home/joao/dev/storefront-remix-starter/app/routes/checkout/payment.tsx:48:24)

The issue is in this code:

            console.log(
                response.errors[0].extensions.exception.stacktrace.join('\n'),
            );

There is no extensions field in the error object, so thats why it fails. Where is this supposed to come from?

@michaelbromley
Copy link
Member

Hi! Thanks for the report. That line of code is making a lot of assumptions about the shape of the error object!

We need to have something a bit more robust here. Would you be interested in making a PR?

@tritao
Copy link
Author

tritao commented Jun 16, 2022

Hey, sure, I can try sending some improvements once I get back to working on this.

@michaelbromley michaelbromley added help wanted Extra attention is needed good first issue Good for newcomers labels Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants