* @param field the field, null if linked to the identifier rather than a field
* @param element the element, not null
* @return the error, not null
*/
public ReferenceDataError buildError(String field, Element element) {
return new ReferenceDataError(field, element.getElementAsInt32("code"), element.getElementAsString("category"),
element.getElementAsString("subcategory"), element.getElementAsString("message"));
}