You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/deploy-vercel-production.yml
+1-1
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ on:
38
38
- 'main'
39
39
40
40
# Allow manual trigger via a button in github or a HTTP call - See https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#manually-running-a-workflow
41
-
# XXX Read more about how to use it with NRN in .github/WORKFLOW_DISPATCH.md
41
+
# XXX See https://unlyed.github.io/next-right-now/guides/ci-cd/gha-deploy-vercel#triggering-the-action-remotely-using-workflow_dispatch
Copy file name to clipboardExpand all lines: .github/workflows/deploy-vercel-staging.yml
+1-1
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ on:
39
39
- 'main'
40
40
41
41
# Allow manual trigger via a button in github or a HTTP call - See https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#manually-running-a-workflow
42
-
# XXX Read more about how to use it with NRN in .github/WORKFLOW_DISPATCH.md
42
+
# XXX See https://unlyed.github.io/next-right-now/guides/ci-cd/gha-deploy-vercel#triggering-the-action-remotely-using-workflow_dispatch
// Display a loader (we could use a skeleton too) when this happens, so that the user doesn't face a white page until the page is generated and displayed
80
-
if(isSSGFallbackInitialBuild&&router.isFallback){// When router.isFallback becomes "false", then it'll mean the page has been generated and rendered and we can display it, instead of the loader
139
+
if(isSSGFallbackInitialBuild&&router?.isFallback){// When router.isFallback becomes "false", then it'll mean the page has been generated and rendered and we can display it, instead of the loader
// Unrecoverable error, we can't even display the layout because we don't have the minimal required information to properly do so.
159
+
// The reason can be a UI crash (something broke due to the user's interaction) and a top-level error was thrown in props.err.
160
+
// Or, it can be because no serializedDataset was provided.
161
+
// Either way, we display the error page, which will take care of reporting the error to Sentry and display an error message depending on the environment.
99
162
if(typeofserializedDataset!=='string'){
100
-
return(
101
-
<ErrorDebug
102
-
error={newError(`Fatal error - Unexpected "serializedDataset" passed as page props.\n
163
+
// eslint-disable-next-line no-console
164
+
console.log('props',props);
165
+
166
+
if(props.err){
167
+
consterror=newError(`Fatal error - A top-level error was thrown by the application, which caused the Page.props to be lost. \n
168
+
The page cannot be shown to the end-user, an error page will be displayed.`);
169
+
logger.error(error);
170
+
171
+
return(
172
+
<ErrorPage
173
+
err={props.err}
174
+
statusCode={500}
175
+
isReadyToRender={true}
176
+
>
177
+
<DefaultErrorLayout
178
+
error={props.err}
179
+
context={pageProps}
180
+
/>
181
+
</ErrorPage>
182
+
);
183
+
}else{
184
+
consterror=newError(`Fatal error - Unexpected "serializedDataset" passed as page props.\n
103
185
Expecting string, but got "${typeofserializedDataset}".\n
104
186
This error is often caused by returning an invalid "serializedDataset" from a getStaticProps/getServerSideProps.\n
105
-
Make sure you return a correct value, using "serializeSafe".`)}
106
-
context={{
107
-
pageProps,
108
-
}}
109
-
/>
110
-
);
187
+
Make sure you return a correct value, using "serializeSafe".`);
`Fatal error when bootstraping the app. The "customer.ref" doesn't match (expected: "${process.env.NEXT_PUBLIC_CUSTOMER_REF}", received: "${customer?.ref}".`,
276
+
`Fatal error - An error happened, the page cannot be displayed. (customer doesn't match)` :
277
+
`Fatal error when bootstrapping the app. The "customer.ref" doesn't match (expected: "${process.env.NEXT_PUBLIC_CUSTOMER_REF}", received: "${customer?.ref}".`,
0 commit comments