fix: improve error messaging for various components to provide clearer feedback on failures
This commit is contained in:
@@ -64,7 +64,7 @@ export default function FunnelReportPage() {
|
||||
if (status === 404) setLoadError('not_found')
|
||||
else if (status === 403) setLoadError('forbidden')
|
||||
else setLoadError('error')
|
||||
if (status !== 404 && status !== 403) toast.error('Failed to load funnel data')
|
||||
if (status !== 404 && status !== 403) toast.error('Failed to load funnel details')
|
||||
} finally {
|
||||
setLoading(false)
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ export default function CreateFunnelPage() {
|
||||
toast.success('Funnel created')
|
||||
router.push(`/sites/${siteId}/funnels`)
|
||||
} catch (error) {
|
||||
toast.error('Failed to create funnel')
|
||||
toast.error('Failed to create funnel. Please try again.')
|
||||
} finally {
|
||||
setSaving(false)
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ export default function FunnelsPage() {
|
||||
const data = await listFunnels(siteId)
|
||||
setFunnels(data)
|
||||
} catch (error) {
|
||||
toast.error('Failed to load funnels')
|
||||
toast.error('Failed to load your funnels')
|
||||
} finally {
|
||||
setLoading(false)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user