Skip to content

Commit

Permalink
Improve documentation about error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadorequest committed Jun 25, 2021
1 parent 774f83f commit f32f876
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const ErrorsHandlingPage: NextPage<Props> = (props): JSX.Element => {
<h2>404 - Using CSR</h2>

<Alert color={'info'}>
This page doesn't exist and should display a 404 page.
This page doesn't exist and should display a 404 page. The error will be reported to Sentry.
</Alert>

<p>
Expand All @@ -98,7 +98,7 @@ const ErrorsHandlingPage: NextPage<Props> = (props): JSX.Element => {
<h2>404 - Using full page reload</h2>

<Alert color={'info'}>
This page doesn't exist and should display a 404 page.
This page doesn't exist and should display a 404 page. The error will be reported to Sentry.
</Alert>

<p>
Expand All @@ -123,6 +123,7 @@ const ErrorsHandlingPage: NextPage<Props> = (props): JSX.Element => {

<Alert color={'info'}>
This page throws an error right from the Page component and should display a 500 page error without anything else (no footer/header).
The error will be reported to Sentry.
</Alert>

<Code
Expand Down Expand Up @@ -162,7 +163,7 @@ const ErrorsHandlingPage: NextPage<Props> = (props): JSX.Element => {

<hr />

<h2>Interactive error (simulating User interaction)</h2>
<h2>Interactive errors (simulating User interaction)</h2>

<Btn mode={'primary-outline'}>
<I18nLink href={'/demo/built-in-utilities/interactive-error'}>Go to interactive error page</I18nLink><br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const InteractiveErrorPage: NextPage<Props> = (props): JSX.Element => {
<Button
onClick={(): void => {
setIsClicked(true);
throw new Error('Page 500 error example');
throw new Error('Page 500 error example (handled)');
}}
>
Will it crash the whole app?
Expand All @@ -99,7 +99,7 @@ const InteractiveErrorPage: NextPage<Props> = (props): JSX.Element => {
<Button
onClick={(): void => {
setIsClicked(true);
throw new Error('Page 500 error example');
throw new Error('Page 500 error example (handled)');
}}
>
Will it crash the whole app?
Expand Down

1 comment on commit f32f876

@github-actions
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.