Skip to content

Commit

Permalink
🐛 [Core] Added missing error message for KapuaEntityUniquenessException
Browse files Browse the repository at this point in the history
Signed-off-by: Alberto Codutti <alberto.codutti@eurotech.com>
  • Loading branch information
Coduz committed May 17, 2024
1 parent e8938c2 commit ecb21f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
*/
public class KapuaEntityUniquenessException extends KapuaException {

private static final long serialVersionUID = -5398114226720500553L;

private final String entityType;
private final List<Map.Entry<String, Object>> uniquesFieldValues;

Expand All @@ -35,7 +37,7 @@ public class KapuaEntityUniquenessException extends KapuaException {
* @since 1.0.0
*/
public KapuaEntityUniquenessException(String entityType, List<Map.Entry<String, Object>> uniquesFieldValues) {
super(KapuaErrorCodes.ENTITY_UNIQUENESS, uniquesFieldValues);
super(KapuaErrorCodes.ENTITY_UNIQUENESS, entityType, uniquesFieldValues);

this.entityType = entityType;
this.uniquesFieldValues = uniquesFieldValues;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ENTITY_CLONE_ERROR=Severe error while cloning: {0}
ENTITY_NOT_FOUND=The entity of type {0} with id/name {1} was not found.
ENTITY_PROPERTIES_READ_ERROR=Error while reading {0} from KapuaEntity. String-formatted value is: {1}
ENTITY_PROPERTIES_WRITE_ERROR=Error while writing {0} to KapuaEntity. Properties are: {1}
ENTITY_UNIQUENESS=Duplicate {0} entry for values: {1}
EXTERNAL_ID_ALREADY_EXIST_IN_ANOTHER_ACCOUNT=An entity with the same external id {0} already exists in another account.
ILLEGAL_ACCESS=The current subject is not authorized for {0}.
ILLEGAL_ARGUMENT=An illegal value was provided for the argument {0}: {1}.
Expand Down

0 comments on commit ecb21f2

Please sign in to comment.