Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit eec7fbcf authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

[EDELIVERY-14171] Fix Invalid group error message

parent 923e7ee1
Branches
Tags
No related merge requests found
Pipeline #221090 failed
......@@ -44,11 +44,11 @@ public enum ErrorCode {
NO_DOMAIN (500,"SMP:110",ErrorBusinessCode.TECHNICAL, "No domain configured on SMP, at least one domain is mandatory!"),
DOMAIN_NOT_EXISTS(404,"SMP:111",ErrorBusinessCode.NOT_FOUND, "Invalid domain '%s'!"),
INVALID_DOMAIN_CODE(400,"SMP:112",ErrorBusinessCode.FORMAT_ERROR,"Provided Domain Code '%s' does not match required pattern: '%s'"),
GROUP_NOT_EXISTS(404,"SMP:111",ErrorBusinessCode.NOT_FOUND, "Invalid domain '%s'!"),
ILLEGAL_STATE_DOMAIN_MULTIPLE_ENTRY(500,"SMP:113",ErrorBusinessCode.TECHNICAL,"More than one domain entry (domain: '%s') is defined in database!"),
MISSING_DOMAIN(400,"SMP:114",ErrorBusinessCode.MISSING_FIELD,"More than one domain registered on SMP. The domain must be defined!"),
ILLEGAL_STATE_DOMAIN_GROUP_MULTIPLE_ENTRY(500,"SMP:115",ErrorBusinessCode.TECHNICAL,"More than one group for domain entry (group: '%s', domain: '%s') is defined in database!"),
INVALID_DOMAIN_DATA (400,"SMP:116",ErrorBusinessCode.INVALID_INPUT_DATA,"Invalid domain data! %s"),
GROUP_NOT_EXISTS(404,"SMP:117",ErrorBusinessCode.NOT_FOUND, "Invalid group '%s'"),
// user error messages
INVALID_USER_NO_IDENTIFIERS (400,"SMP:120",ErrorBusinessCode.MISSING_FIELD,"Invalid user - no identifiers!"),
......
......@@ -173,7 +173,7 @@ public class DomainResolverService {
}
if (authorizedGroup.stream().filter(entity -> equalsIgnoreCase(entity.getGroupName(), domainGroup)).count() == 0) {
throw new SMPRuntimeException(ErrorCode.GROUP_NOT_EXISTS, domainCode);
throw new SMPRuntimeException(ErrorCode.GROUP_NOT_EXISTS, domainGroup);
}
DBGroup group = authorizedGroup.stream()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment