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

Throw error when run jss start using FETCH_WITH=GraphQL #920

Merged
merged 3 commits into from Feb 4, 2022

Conversation

sc-addypathania
Copy link
Contributor

@sc-addypathania sc-addypathania commented Feb 2, 2022

The user should see a friendly error message when they try to run jss start i.e disconnected mode when fetchWtih is set to 'GraphQL'.

Description / Motivation

Testing Details

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@vercel
Copy link

vercel bot commented Feb 2, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/sitecore-jss/edge-e2e-styleguide/5k6ruPPVm5trTfPLdwsS2RTSVogZ
✅ Preview: Failed

[Deployment for be8d3d8 failed]

@sc-addypathania sc-addypathania requested a review from a team February 2, 2022 21:57
Copy link
Contributor

@ambrauer ambrauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just some suggestions

Copy link
Contributor

@ambrauer ambrauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question, otherwise looks great!

@@ -23,6 +23,7 @@
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"useUnknownInCatchVariables": false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious - what was the reason for adding this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build for the nextjs package was failing in the editing-render-middleware.ts file.
I got this error in the catch block.
image
Starting typescript v4.0, catch clause variables have type unknown instead of any.
This is a workaround I found.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. This change actually seems to be breaking the build on CI.

tsconfig.json(26,5): error TS5023: Unknown compiler option 'useUnknownInCatchVariables'.

We should probably revert this. Guessing it's something on your local env that's causing the error for you?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, probably something with my local environment.

@ambrauer ambrauer merged commit 15f004e into dev Feb 4, 2022
@ambrauer ambrauer deleted the feature/514933-fetch-with-error-message branch February 4, 2022 17:25
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

Successfully merging this pull request may close these issues.

None yet

2 participants