efficiency and exception change

This commit is contained in:
Julian Krauser 2024-09-06 10:08:19 +02:00
parent 4048c21c1f
commit 88212ff79b
32 changed files with 121 additions and 124 deletions

View file

@ -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);
});
}
}