MCPcopy Create free account
hub / github.com/TryCatchLearn/Overflow / Error

Function Error

webapp/src/app/error.tsx:6–34  ·  view source on GitHub ↗
({
                                  error,
                                  reset,
                              }: {
    error: Error & { digest?: string }
    reset: () => void
})

Source from the content-addressed store, hash-verified

4import {Button} from "@heroui/button";
5
6export default function Error({
7 error,
8 reset,
9 }: {
10 error: Error & { digest?: string }
11 reset: () => void
12}) {
13 useEffect(() => {
14 console.error(error)
15 }, [error])
16
17 return (
18 <div className='h-full flex items-center justify-center space-y-6'>
19 <div className='flex flex-col items-center text-center gap-6'>
20 <h1 className='text-5xl font-bold'>Something went wrong!</h1>
21 <h3 className='text-3xl text-danger-600'>{error.message}</h3>
22 <Button
23 color='primary'
24 onPress={
25 () => reset()
26 }
27 >
28 Try again
29 </Button>
30 </div>
31
32 </div>
33 )
34}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…