File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,12 @@ export default function Form({
56
56
}
57
57
toast . success ( `Successfully updated ${ inputAttrs . name } !` ) ;
58
58
} )
59
- . catch ( ( err : Error ) => toast . error ( err . message ) ) ;
59
+ . catch ( ( err : Error ) => {
60
+ console . log ( err ) ;
61
+ // ideally we'd wanna log the actual error, but for some reason
62
+ // server action errors are obfuscated in prod
63
+ toast . error ( `This ${ inputAttrs . name } is already in use.` ) ;
64
+ } ) ;
60
65
} }
61
66
className = "rounded-lg border border-stone-200 bg-white"
62
67
>
Original file line number Diff line number Diff line change @@ -24,7 +24,12 @@ export default function CreateSiteModal() {
24
24
modal ?. hide ( ) ;
25
25
toast . success ( `Successfully created site!` ) ;
26
26
} )
27
- . catch ( ( err : Error ) => toast . error ( err . message ) )
27
+ . catch ( ( err : Error ) => {
28
+ console . log ( err ) ;
29
+ // ideally we'd wanna log the actual error, but for some reason
30
+ // server action errors are obfuscated in prod
31
+ toast . error ( `This subdomain is already in use.` ) ;
32
+ } )
28
33
}
29
34
className = "w-full rounded-md bg-white md:max-w-md md:border md:border-stone-200 md:shadow"
30
35
>
You can’t perform that action at this time.
0 commit comments