Refactoring. Getting error string rather than array from model