mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 08:25:44 +01:00
Introduce default error object with context for not found exceptions
This commit is contained in:
@@ -219,7 +219,7 @@ public class DefaultUserManager extends AbstractUserManager
|
||||
|
||||
if (fresh == null)
|
||||
{
|
||||
throw new NotFoundException();
|
||||
throw new NotFoundException(User.class, user.getName());
|
||||
}
|
||||
|
||||
fresh.copyProperties(user);
|
||||
@@ -419,7 +419,7 @@ public class DefaultUserManager extends AbstractUserManager
|
||||
public void overwritePassword(String userId, String newPassword) {
|
||||
User user = get(userId);
|
||||
if (user == null) {
|
||||
throw new NotFoundException();
|
||||
throw new NotFoundException(User.class, userId);
|
||||
}
|
||||
if (!isTypeDefault(user)) {
|
||||
throw new ChangePasswordNotAllowedException(user.getType());
|
||||
|
||||
Reference in New Issue
Block a user