mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-04 05:39:57 -05:00
app: handle form fetch failures without unhandled rejection
Catch useForm fetcher errors and surface them so DomainEditPage can show a not-found message instead of hanging on the loader (and so the webpack overlay no longer flakes Cypress).
This commit is contained in:
parent
f5615440e5
commit
0850b6a7fe
5 changed files with 104 additions and 10 deletions
|
|
@ -630,6 +630,15 @@ export function DomainEditPage() {
|
|||
};
|
||||
|
||||
if (!form.ready) {
|
||||
if (form.error) {
|
||||
return <>
|
||||
<BackButton/>
|
||||
<Message error>
|
||||
<Message.Header>Domain not found</Message.Header>
|
||||
<p>{form.error}</p>
|
||||
</Message>
|
||||
</>;
|
||||
}
|
||||
return <Loader active>Loading domain...</Loader>;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue