when getting an object, if at least one is found, display errors but correctly return the found object