Fixes #5059 - Returns error message when sorting by wrong column

```$ hammer product list --organization org-7 --order "potatoes"```
```Unable to order by column 'potatoes'.```

Previous behavior was:
```$ hammer product list --organization org-7 --order "potatoes"```
```No data.```
Had to move this to separate function to pass rubocop's perceived complexity cop