kesekian kali
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user