refactor error handling on company#update in rails controller