update login error message
This commit is contained in:
@@ -11,7 +11,10 @@ export async function startServerAction(serverId: string) {
|
||||
revalidatePath('/dashboard');
|
||||
revalidatePath(`/dashboard/server/${serverId}`);
|
||||
} catch (error) {
|
||||
throw new Error(error instanceof Error ? error.message : 'Failed to start server');
|
||||
return {
|
||||
success: false,
|
||||
message: error instanceof Error ? error.message : 'Failed to start server'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +25,10 @@ export async function stopServerAction(serverId: string) {
|
||||
revalidatePath('/dashboard');
|
||||
revalidatePath(`/dashboard/server/${serverId}`);
|
||||
} catch (error) {
|
||||
throw new Error(error instanceof Error ? error.message : 'Failed to stop server');
|
||||
return {
|
||||
success: false,
|
||||
message: error instanceof Error ? error.message : 'Failed to stop server'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +39,9 @@ export async function restartServerAction(serverId: string) {
|
||||
revalidatePath('/dashboard');
|
||||
revalidatePath(`/dashboard/server/${serverId}`);
|
||||
} catch (error) {
|
||||
throw new Error(error instanceof Error ? error.message : 'Failed to restart server');
|
||||
return {
|
||||
success: false,
|
||||
message: error instanceof Error ? error.message : 'Failed to restart server'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user