Skip to content

Commit 2b68cf9

Browse files
committed
Add comment to empty catch block
1 parent 15e56c3 commit 2b68cf9

File tree

6 files changed

+36
-12
lines changed

6 files changed

+36
-12
lines changed

src/routes/(console)/project-[region]-[project]/functions/function-[function]/domains/add-domain/+page.svelte

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@
5656
teamId: $project.teamId,
5757
domain: apexDomain
5858
});
59-
} catch (error) {}
59+
} catch (error) {
60+
// Empty as domain creation error needs to be silent
61+
}
6062
}
6163
6264
try {
@@ -93,7 +95,9 @@
9395
if (isCloud) {
9496
try {
9597
await sdk.forConsole.domains.updateNameservers({ domainId: domain.$id });
96-
} catch (error) {}
98+
} catch (error) {
99+
// Empty as domain update error needs to be silent
100+
}
97101
}
98102
} else {
99103
await goto(`${routeBase}/add-domain/verify-${domainName}?rule=${rule.$id}`);

src/routes/(console)/project-[region]-[project]/functions/function-[function]/domains/add-domain/verify-[domain]/+page.svelte

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@
6363
'Domain verification failed. Please check your domain settings or try again later'
6464
);
6565
}
66-
} catch (error) {}
66+
} catch (error) {
67+
// Empty as domain creation error needs to be silent
68+
}
6769
6870
try {
6971
const domain = data.domainsList.domains.find(
@@ -80,7 +82,9 @@
8082
);
8183
}
8284
}
83-
} catch (error) {}
85+
} catch (error) {
86+
// Empty as domain update error needs to be silent
87+
}
8488
}
8589
}
8690

src/routes/(console)/project-[region]-[project]/settings/domains/add-domain/+page.svelte

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
teamId: $project.teamId,
3737
domain: apexDomain
3838
});
39-
} catch (error) {}
39+
} catch (error) {
40+
// Empty as domain creation error needs to be silent
41+
}
4042
}
4143
4244
try {
@@ -49,7 +51,9 @@
4951
if (isCloud) {
5052
try {
5153
await sdk.forConsole.domains.updateNameservers({ domainId: domain.$id });
52-
} catch (error) {}
54+
} catch (error) {
55+
// Empty as domain update error needs to be silent
56+
}
5357
}
5458
} else {
5559
await goto(`${routeBase}/add-domain/verify-${domainName}?rule=${rule.$id}`);

src/routes/(console)/project-[region]-[project]/settings/domains/add-domain/verify-[domain]/+page.svelte

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@
6565
'Domain verification failed. Please check your domain settings or try again later'
6666
);
6767
}
68-
} catch (error) {}
68+
} catch (error) {
69+
// Empty as domain creation error needs to be silent
70+
}
6971
7072
try {
7173
const domain = data.domainsList.domains.find(
@@ -82,7 +84,9 @@
8284
);
8385
}
8486
}
85-
} catch (error) {}
87+
} catch (error) {
88+
// Empty as domain update error needs to be silent
89+
}
8690
}
8791
}
8892

src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/add-domain/+page.svelte

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@
6666
teamId: $project.teamId,
6767
domain: apexDomain
6868
});
69-
} catch (error) {}
69+
} catch (error) {
70+
// Empty as domain creation error needs to be silent
71+
}
7072
}
7173
7274
try {
@@ -103,7 +105,9 @@
103105
if (isCloud) {
104106
try {
105107
await sdk.forConsole.domains.updateNameservers({ domainId: domain.$id });
106-
} catch (error) {}
108+
} catch (error) {
109+
// Empty as domain update error needs to be silent
110+
}
107111
}
108112
} else {
109113
await goto(`${routeBase}/add-domain/verify-${domainName}?rule=${rule.$id}`);

src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/add-domain/verify-[domain]/+page.svelte

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@
6565
'Domain verification failed. Please check your domain settings or try again later'
6666
);
6767
}
68-
} catch (error) {}
68+
} catch (error) {
69+
// Empty as domain creation error needs to be silent
70+
}
6971
7072
try {
7173
const domain = data.domainsList.domains.find(
@@ -82,7 +84,9 @@
8284
);
8385
}
8486
}
85-
} catch (error) {}
87+
} catch (error) {
88+
// Empty as domain update error needs to be silent
89+
}
8690
}
8791
}
8892

0 commit comments

Comments
 (0)