-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor: added error reporting to sentry for all our server actions
- Loading branch information
Showing
10 changed files
with
65 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Button, FocusHeader } from '@latitude-data/web-ui' | ||
import * as Sentry from '@sentry/nextjs' | ||
import { FocusLayout } from '$/components/layouts' | ||
|
||
export default function ErrorTestPage() { | ||
async function triggerServerError() { | ||
'use server' | ||
|
||
const error = new Error('This is a test server error') | ||
Sentry.captureException(error) | ||
throw error | ||
} | ||
|
||
return ( | ||
<FocusLayout header={<FocusHeader title='Error test page' />}> | ||
<div className='flex flex-col items-center justify-center h-full'> | ||
<form action={triggerServerError}> | ||
<Button type='submit'>Trigger Server Error</Button> | ||
</form> | ||
</div> | ||
</FocusLayout> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ export default function LoginForm({ footer }: { footer: ReactNode }) { | |
placeholder='Ex.: [email protected]' | ||
errors={errors?.email} | ||
/> | ||
<Button fullWidth isLoading={isPending}> | ||
<Button fullWidth isLoading={isPending && !error}> | ||
Login | ||
</Button> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Maybe send userId and workspaceId also here to check what happened.