efficiency and exception change
This commit is contained in:
parent
4048c21c1f
commit
88212ff79b
32 changed files with 121 additions and 124 deletions
|
@ -16,8 +16,8 @@ export default abstract class AwardService {
|
|||
.then((res) => {
|
||||
return res;
|
||||
})
|
||||
.catch(() => {
|
||||
throw new InternalException("awards not found");
|
||||
.catch((err) => {
|
||||
throw new InternalException("awards not found", err);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -34,8 +34,8 @@ export default abstract class AwardService {
|
|||
.then((res) => {
|
||||
return res;
|
||||
})
|
||||
.catch(() => {
|
||||
throw new InternalException("award not found by id");
|
||||
.catch((err) => {
|
||||
throw new InternalException("award not found by id", err);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,8 @@ export default abstract class AwardService {
|
|||
// .then((res) => {
|
||||
// return [];
|
||||
// })
|
||||
// .catch(() => {
|
||||
// throw new InternalException("award assigned members not found by id");
|
||||
// .catch((err) => {
|
||||
// throw new InternalException("award assigned members not found by id", err);
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -17,8 +17,8 @@ export default abstract class CommunicationService {
|
|||
.then((res) => {
|
||||
return res;
|
||||
})
|
||||
.catch(() => {
|
||||
throw new InternalException("communications not found by userid");
|
||||
.catch((err) => {
|
||||
throw new InternalException("communications not found by userid", err);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@ export default abstract class CommunicationTypeService {
|
|||
.then((res) => {
|
||||
return res;
|
||||
})
|
||||
.catch(() => {
|
||||
throw new InternalException("communicationTypes not found");
|
||||
.catch((err) => {
|
||||
throw new InternalException("communicationTypes not found", err);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -35,8 +35,8 @@ export default abstract class CommunicationTypeService {
|
|||
.then((res) => {
|
||||
return res;
|
||||
})
|
||||
.catch(() => {
|
||||
throw new InternalException("communicationType not found by id");
|
||||
.catch((err) => {
|
||||
throw new InternalException("communicationType not found by id", err);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -54,8 +54,8 @@ export default abstract class CommunicationTypeService {
|
|||
// .then((res) => {
|
||||
// return [];
|
||||
// })
|
||||
// .catch(() => {
|
||||
// throw new InternalException("communicationType assigned members not found by id");
|
||||
// .catch((err) => {
|
||||
// throw new InternalException("communicationType assigned members not found by id", err);
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -16,8 +16,8 @@ export default abstract class ExecutivePositionService {
|
|||
.then((res) => {
|
||||
return res;
|
||||
})
|
||||
.catch(() => {
|
||||
throw new InternalException("executivePositions not found");
|
||||
.catch((err) => {
|
||||
throw new InternalException("executivePositions not found", err);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -34,8 +34,8 @@ export default abstract class ExecutivePositionService {
|
|||
.then((res) => {
|
||||
return res;
|
||||
})
|
||||
.catch(() => {
|
||||
throw new InternalException("executivePosition not found by id");
|
||||
.catch((err) => {
|
||||
throw new InternalException("executivePosition not found by id", err);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ export default abstract class InviteService {
|
|||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new InternalException("invite not found by mail and token");
|
||||
throw new InternalException("invite not found by mail and token", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,8 +16,8 @@ export default abstract class MembershipStatusService {
|
|||
.then((res) => {
|
||||
return res;
|
||||
})
|
||||
.catch(() => {
|
||||
throw new InternalException("membershipStatuss not found");
|
||||
.catch((err) => {
|
||||
throw new InternalException("membershipStatuss not found", err);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -34,8 +34,8 @@ export default abstract class MembershipStatusService {
|
|||
.then((res) => {
|
||||
return res;
|
||||
})
|
||||
.catch(() => {
|
||||
throw new InternalException("membershipStatus not found by id");
|
||||
.catch((err) => {
|
||||
throw new InternalException("membershipStatus not found by id", err);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,8 @@ export default abstract class MembershipStatusService {
|
|||
// .then((res) => {
|
||||
// return [];
|
||||
// })
|
||||
// .catch(() => {
|
||||
// throw new InternalException("membershipStatus assigned members not found by id");
|
||||
// .catch((err) => {
|
||||
// throw new InternalException("membershipStatus assigned members not found by id", err);
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -16,8 +16,8 @@ export default abstract class QualificationService {
|
|||
.then((res) => {
|
||||
return res;
|
||||
})
|
||||
.catch(() => {
|
||||
throw new InternalException("qualifications not found");
|
||||
.catch((err) => {
|
||||
throw new InternalException("qualifications not found", err);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -34,8 +34,8 @@ export default abstract class QualificationService {
|
|||
.then((res) => {
|
||||
return res;
|
||||
})
|
||||
.catch(() => {
|
||||
throw new InternalException("qualification not found by id");
|
||||
.catch((err) => {
|
||||
throw new InternalException("qualification not found by id", err);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,8 @@ export default abstract class QualificationService {
|
|||
// .then((res) => {
|
||||
// return [];
|
||||
// })
|
||||
// .catch(() => {
|
||||
// throw new InternalException("qualification assigned members not found by id");
|
||||
// .catch((err) => {
|
||||
// throw new InternalException("qualification assigned members not found by id", err);
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ export default abstract class RefreshService {
|
|||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new InternalException("refresh not found");
|
||||
throw new InternalException("refresh not found", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ export default abstract class RolePermissionService {
|
|||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new InternalException("permissions not found by role");
|
||||
throw new InternalException("permissions not found by role", err);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ export default abstract class RolePermissionService {
|
|||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new InternalException("permissions not found by roles");
|
||||
throw new InternalException("permissions not found by roles", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ export default abstract class RoleService {
|
|||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new InternalException("roles not found");
|
||||
throw new InternalException("roles not found", err);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ export default abstract class RoleService {
|
|||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new InternalException("role not found by id");
|
||||
throw new InternalException("role not found by id", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ export default abstract class UserPermissionService {
|
|||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new InternalException("permission not found by user");
|
||||
throw new InternalException("permission not found by user", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ export default abstract class UserService {
|
|||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new InternalException("users not found");
|
||||
throw new InternalException("users not found", err);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ export default abstract class UserService {
|
|||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new InternalException("user not found by id");
|
||||
throw new InternalException("user not found by id", err);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ export default abstract class UserService {
|
|||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new InternalException("user not found by username");
|
||||
throw new InternalException("user not found by username", err);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ export default abstract class UserService {
|
|||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new InternalException("user not found by mail or username");
|
||||
throw new InternalException("user not found by mail or username", err);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ export default abstract class UserService {
|
|||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new InternalException("could not count users");
|
||||
throw new InternalException("could not count users", err);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ export default abstract class UserService {
|
|||
return res.roles;
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new InternalException("could not get roles for user");
|
||||
throw new InternalException("could not get roles for user", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue