refactor error message handling
add ontologies controller specs on deletion
add repository controller spec on deletion