kesekian kali

This commit is contained in:
Randa Firman Putra
2025-08-25 22:38:49 +07:00
parent 9f2c8775f5
commit eb8c4f55a6
7 changed files with 9 additions and 6 deletions

View File

@@ -278,8 +278,10 @@ export default function DataTablePrestasiMahasiswa() {
if (!response.ok) {
// Handle specific NIM not found error
if (response.status === 404 && responseData.message.includes("tidak terdaftar")) {
showError("Gagal!", `NIM ${formData.nim} tidak terdaftar`);
throw new Error(`NIM ${formData.nim} tidak terdaftar dalam database. Silakan cek kembali NIM yang dimasukkan.`);
}
showError("Gagal!", responseData.message || "Failed to add prestasi");
throw new Error(responseData.message || "Failed to add prestasi");
}