Skip to content

Commit 57598ce

Browse files
authored
Merge pull request #1240 from geelongmicrosoldering/patch-1
Return status in handleReboot
2 parents e4840d2 + 299de76 commit 57598ce

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/settings/PreferencesPage.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ const PreferencesPage = () => {
8989

9090
const handleReboot = useCatch(async () => {
9191
const response = await fetch('/api/server/reboot', { method: 'POST' });
92-
if (!response.ok) {
93-
throw Error(await response.text());
94-
}
92+
throw Error(response.statusText);
9593
});
9694

9795
return (

0 commit comments

Comments
 (0)