My question is regarding the error 483 and if it occurs only when typing in an existing organization name, or does it occur in other situations?
Release : 5.0.2
Component : API PORTAL
After talking to developers
The error payloads looks like following:
error:
{
code: "Validation Exception" <-- indicates that entity failed one or more portal validation rules
detail:{ <--- in this section all fields that failed validation will appear
code: 483 <--- generic validation exception code
user.error.key: "error.validation.entity" <-- is handy string to use for client side validation, since it will be constant for all validation errors
fields: [ <---- Will list all the fields that failed the validation with corresponding error message
{
key: "error.validation.organization.field.notunique" <--- this indicates that organization name rule failed validation
},
{
}
]
}
}
This is source code, as you can see 483 is generic validation error
public static final E ENTITY_VALIDATION_ERROR = e(483, "The request could not be completed due to data input errors.", PORTAL_ERROR_KEY_NAMESPACE + ".validation.entity");
while
public static final E VALIDATION_ORGANIZATION_NOT_UNIQUE = e(7016, "The value for organization field must be unique.", PORTAL_ERROR_KEY_NAMESPACE + ".validation.organization.field.notunique");
I would say use error.validation.organization.field.notunique in the fields to localize the message