Display more accurate error message

This commit is contained in:
Phan Huy Tran 2025-01-15 09:32:23 +01:00
parent d96bf3d475
commit 188ef0b3a1

View File

@ -42,7 +42,7 @@ export class DeleteComponent {
if (error.error.message.includes('SQL')) { if (error.error.message.includes('SQL')) {
// The API message is undescriptive but this is the most common // The API message is undescriptive but this is the most common
this.apiError = 'This qualification cannot be modified because it is currently assigned to one or more employees'; this.apiError = 'This qualification cannot be deleted because it is currently assigned to one or more employees';
} else { } else {
this.apiError = 'API Error'; this.apiError = 'API Error';
} }