Made set_error() method DRY.
Reverted indenting spaces back to tabs.

(My fault - Sorry!)
Merge pull request #2417 from thefuzzy0ne/fix/upload_dry

Fix/upload dry