Deleting user now works, and forces you to allocate tasks from each user to another user before deleting them

This commit is contained in:
NPS Agent
2026-05-13 10:40:57 +09:30
parent ee5f55bc8e
commit fd84caef63
7 changed files with 24 additions and 5 deletions
+6 -1
View File
@@ -32,7 +32,12 @@ class ApiService {
if (response.status === 401) {
this.logout();
}
throw new Error(`API Error: ${response.statusText}`);
let errorMsg = response.statusText;
try {
const data = await response.json();
if (data && data.detail) errorMsg = data.detail;
} catch (e) {}
throw new Error(`API Error: ${errorMsg}`);
}
return response.json();