Log all failing API responses when uploading
This is mostly separate from the current code. The purpose of logging
we had so far was to log the errors users see. The purpose of this is
to log the exact API responses, so that we can better guess what
caused the error seen by the user.