Display proper error message on save of invalid project settings
Let the user know which project setting is invalid, e.g. if the user types in an invalid max object size limit. Change-Id: Iac237e83366c783a77068a50d57404fa2341fd1b Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
parent
489b0f5db6
commit
cc9822937d
@ -124,7 +124,12 @@ public class PutConfig implements RestModifyView<ProjectResource, Input> {
|
||||
(new PerRequestProjectControlCache(projectCache, self.get()))
|
||||
.evict(projectConfig.getProject());
|
||||
} catch (IOException e) {
|
||||
throw new ResourceConflictException("Cannot update " + projectName);
|
||||
if (e.getCause() instanceof ConfigInvalidException) {
|
||||
throw new ResourceConflictException("Cannot update " + projectName
|
||||
+ ": " + e.getCause().getMessage());
|
||||
} else {
|
||||
throw new ResourceConflictException("Cannot update " + projectName);
|
||||
}
|
||||
}
|
||||
return new ConfigInfo(projectStateFactory.create(projectConfig), config);
|
||||
} catch (ConfigInvalidException err) {
|
||||
|
Loading…
Reference in New Issue
Block a user