mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
75451: Make error messages public
The messages can then be used in the integration tests, instead of hardcoding the expected response.
This commit is contained in:
@@ -21,11 +21,11 @@ import java.util.UUID;
|
||||
*/
|
||||
public class EmptyWorkflowGroupException extends IllegalStateException {
|
||||
|
||||
public static final String msgFmt = "Refused to delete user %s because it is the only member of the " +
|
||||
"workflow group %s. Delete the tasks and group first if you want to remove this user.";
|
||||
|
||||
public EmptyWorkflowGroupException(UUID ePersonId, UUID groupId) {
|
||||
super(String.format(
|
||||
"Refused to delete user %s because it is the only member of the workflow group %s. " +
|
||||
"Delete the tasks and group first if you want to remove this user.", ePersonId, groupId
|
||||
));
|
||||
super(String.format(msgFmt, ePersonId, groupId));
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@ package org.dspace.app.rest.exception;
|
||||
*/
|
||||
public class EPersonNameNotProvidedException extends UnprocessableEntityException {
|
||||
|
||||
private static final String message = "The eperson.firstname and eperson.lastname values need to be filled in";
|
||||
public static final String message = "The eperson.firstname and eperson.lastname values need to be filled in";
|
||||
|
||||
public EPersonNameNotProvidedException() {
|
||||
super(message);
|
||||
|
@@ -17,7 +17,7 @@ package org.dspace.app.rest.exception;
|
||||
*/
|
||||
public class GroupNameNotProvidedException extends UnprocessableEntityException {
|
||||
|
||||
private static final String message = "cannot create group, no group name is provided";
|
||||
public static final String message = "cannot create group, no group name is provided";
|
||||
|
||||
public GroupNameNotProvidedException() {
|
||||
super(message);
|
||||
|
Reference in New Issue
Block a user