Merge "API: Improve upload error reporting"