update database error messages

This commit is contained in:
Julian Krauser 2025-01-29 09:42:22 +01:00
parent f89483f878
commit f245ff74a8
72 changed files with 325 additions and 441 deletions

View file

@ -1,5 +1,6 @@
import { dataSource } from "../../../data-source";
import { membership } from "../../../entity/club/member/membership";
import DatabaseActionException from "../../../exceptions/databaseActionException";
import InternalException from "../../../exceptions/internalException";
import { membershipView } from "../../../views/membershipsView";
@ -21,7 +22,7 @@ export default abstract class MembershipService {
return res;
})
.catch((err) => {
throw new InternalException("member memberships not found", err);
throw new DatabaseActionException("SELECT", "membershis", err);
});
}
@ -43,7 +44,7 @@ export default abstract class MembershipService {
return res;
})
.catch((err) => {
throw new InternalException("member membership not found by id", err);
throw new DatabaseActionException("SELECT", "membership", err);
});
}
@ -62,7 +63,7 @@ export default abstract class MembershipService {
return res;
})
.catch((err) => {
throw new InternalException("membershipView not found by id", err);
throw new DatabaseActionException("SELECT", "membershipView", err);
});
}
}