Improve upload error messages

@tejohnso please review
Definitely. I didn't do it yet because otherwise the branch build would be using master for its dependencies, which do not yet have the required changes merged.