efficiency and exception change
This commit is contained in:
parent
4048c21c1f
commit
88212ff79b
32 changed files with 121 additions and 124 deletions
|
@ -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