Skip to content

Commit f3703e6

Browse files
authored
Merge pull request #2112 from Marukome0743/error
refactor: remove unused catch errors
2 parents 14cb6ce + e12df7b commit f3703e6

46 files changed

Lines changed: 73 additions & 73 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/dokploy/components/dashboard/application/advanced/cluster/modify-swarm-settings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ const createStringToJSONSchema = (schema: z.ZodTypeAny) => {
130130
}
131131
try {
132132
return JSON.parse(str);
133-
} catch (_e) {
133+
} catch {
134134
ctx.addIssue({ code: "custom", message: "Invalid JSON format" });
135135
return z.NEVER;
136136
}

apps/dokploy/components/dashboard/application/advanced/import/show-import.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export const ShowImport = ({ composeId }: Props) => {
107107
composeId,
108108
});
109109
setShowModal(false);
110-
} catch (_error) {
110+
} catch {
111111
toast.error("Error importing template");
112112
}
113113
};
@@ -126,7 +126,7 @@ export const ShowImport = ({ composeId }: Props) => {
126126
});
127127
setTemplateInfo(result);
128128
setShowModal(true);
129-
} catch (_error) {
129+
} catch {
130130
toast.error("Error processing template");
131131
}
132132
};

apps/dokploy/components/dashboard/compose/general/compose-file-editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export const ComposeFileEditor = ({ composeId }: Props) => {
7777
composeId,
7878
});
7979
})
80-
.catch((_e) => {
80+
.catch(() => {
8181
toast.error("Error updating the Compose config");
8282
});
8383
};

apps/dokploy/components/dashboard/compose/general/show-converted-compose.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const ShowConvertedCompose = ({ composeId }: Props) => {
4040
.then(() => {
4141
refetch();
4242
})
43-
.catch((_err) => {});
43+
.catch(() => {});
4444
}
4545
}, [isOpen]);
4646

apps/dokploy/components/dashboard/project/add-application.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export const AddApplication = ({ projectId, projectName }: Props) => {
103103
projectId,
104104
});
105105
})
106-
.catch((_e) => {
106+
.catch(() => {
107107
toast.error("Error creating the service");
108108
});
109109
};

apps/dokploy/components/dashboard/settings/notifications/handle-notifications.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,7 @@ export const HandleNotifications = ({ notificationId }: Props) => {
10631063
});
10641064
}
10651065
toast.success("Connection Success");
1066-
} catch (_err) {
1066+
} catch {
10671067
toast.error("Error testing the provider");
10681068
}
10691069
}}

apps/dokploy/components/dashboard/settings/profile/disable-2fa.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const Disable2FA = () => {
6363
toast.success("2FA disabled successfully");
6464
utils.user.get.invalidate();
6565
setIsOpen(false);
66-
} catch (_error) {
66+
} catch {
6767
form.setError("password", {
6868
message: "Connection error. Please try again.",
6969
});

apps/dokploy/components/dashboard/settings/servers/actions/toggle-docker-cleanup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const ToggleDockerCleanup = ({ serverId }: Props) => {
3636
await refetch();
3737
}
3838
toast.success("Docker Cleanup updated");
39-
} catch (_error) {
39+
} catch {
4040
toast.error("Docker Cleanup Error");
4141
}
4242
};

apps/dokploy/components/dashboard/settings/servers/gpu-support.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export function GPUSupport({ serverId }: GPUSupportProps) {
5656
try {
5757
await utils.settings.checkGPUStatus.invalidate({ serverId });
5858
await refetch();
59-
} catch (_error) {
59+
} catch {
6060
toast.error("Failed to refresh GPU status");
6161
} finally {
6262
setIsRefreshing(false);
@@ -74,7 +74,7 @@ export function GPUSupport({ serverId }: GPUSupportProps) {
7474

7575
try {
7676
await setupGPU.mutateAsync({ serverId });
77-
} catch (_error) {
77+
} catch {
7878
// Error handling is done in mutation's onError
7979
}
8080
};

apps/dokploy/components/dashboard/settings/users/show-invitations.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export const ShowInvitations = () => {
146146
{invitation.status === "pending" && (
147147
<DropdownMenuItem
148148
className="w-full cursor-pointer"
149-
onSelect={(_e) => {
149+
onSelect={() => {
150150
copy(
151151
`${origin}/invitation?token=${invitation.id}`,
152152
);
@@ -162,7 +162,7 @@ export const ShowInvitations = () => {
162162
{invitation.status === "pending" && (
163163
<DropdownMenuItem
164164
className="w-full cursor-pointer"
165-
onSelect={async (_e) => {
165+
onSelect={async () => {
166166
const result =
167167
await authClient.organization.cancelInvitation(
168168
{
@@ -189,7 +189,7 @@ export const ShowInvitations = () => {
189189
)}
190190
<DropdownMenuItem
191191
className="w-full cursor-pointer"
192-
onSelect={async (_e) => {
192+
onSelect={async () => {
193193
await removeInvitation({
194194
invitationId: invitation.id,
195195
}).then(() => {

0 commit comments

Comments
 (0)