Support for errors during upload

Prints out known errors, or generic case if unknown error.