mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 15:03:18 +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 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) {
|
public EmptyWorkflowGroupException(UUID ePersonId, UUID groupId) {
|
||||||
super(String.format(
|
super(String.format(msgFmt, ePersonId, groupId));
|
||||||
"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
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -17,7 +17,7 @@ package org.dspace.app.rest.exception;
|
|||||||
*/
|
*/
|
||||||
public class EPersonNameNotProvidedException extends UnprocessableEntityException {
|
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() {
|
public EPersonNameNotProvidedException() {
|
||||||
super(message);
|
super(message);
|
||||||
|
@@ -17,7 +17,7 @@ package org.dspace.app.rest.exception;
|
|||||||
*/
|
*/
|
||||||
public class GroupNameNotProvidedException extends UnprocessableEntityException {
|
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() {
|
public GroupNameNotProvidedException() {
|
||||||
super(message);
|
super(message);
|
||||||
|
Reference in New Issue
Block a user